# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::Buffer Class Reference

Implements a buffer whose storage is in local memory. More...

`#include <Buffer.hpp>`

Inheritance diagram for vl::Buffer:

List of all members.

## Public Member Functions
virtual const char * | className ()
| Returns the name of the class.
| Buffer ()
| Buffer (const Buffer &other)
Buffer & | operator= (const Buffer &other)
void | swap (Buffer &other)
| ~Buffer ()
void | clear ()
void | resize (int byte_count, int alignment=0)
int | bytesUsed () const
bool | empty () const
unsigned char * | ptr ()
const unsigned char * | ptr () const
int | alignment () const
## Static Public Member Functions
static void * | alignedMalloc (int bytes, int alignment)
static void | alignedFree (void *ptr)
## Protected Attributes
unsigned char * | mPtr
int | mByteCount
int | mAlignment

## Detailed Description

Implements a buffer whose storage is in local memory.

## Constructor & Destructor Documentation

vl::Buffer::Buffer | ( |  | ) | `[inline]`

vl::Buffer::Buffer | ( | const Buffer & | other | ) | `[inline]`

vl::Buffer::~Buffer | ( |  | ) | `[inline]`

## Member Function Documentation

virtual const char* vl::Buffer::className | ( |  | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::Object.

Reimplemented in vl::GLBufferObject.

Buffer& vl::Buffer::operator= | ( | const Buffer & | other | ) | `[inline]`

void vl::Buffer::swap | ( | Buffer & | other | ) | `[inline]`

void vl::Buffer::clear | ( |  | ) | `[inline]`

void vl::Buffer::resize | ( | int | byte_count,
|  | int | alignment = `0` |
| ) |  |  | `[inline]`

int vl::Buffer::bytesUsed | ( |  | ) | const`[inline]`

bool vl::Buffer::empty | ( |  | ) | const`[inline]`

unsigned char* vl::Buffer::ptr | ( |  | ) | `[inline]`

const unsigned char* vl::Buffer::ptr | ( |  | ) | const`[inline]`

int vl::Buffer::alignment | ( |  | ) | const`[inline]`

static void* vl::Buffer::alignedMalloc | ( | int | bytes,
|  | int | alignment |
| ) |  |  | `[inline, static]`

static void vl::Buffer::alignedFree | ( | void * | ptr | ) | `[inline, static]`

## Member Data Documentation

unsigned char* vl::Buffer::mPtr`[protected]`

int vl::Buffer::mByteCount`[protected]`

int vl::Buffer::mAlignment`[protected]`

The documentation for this class was generated from the following file:

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Buffer.hpp

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 29 11:11:44 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.