ork::CPUBuffer Class Reference
[render]

A Buffer whose data is on the CPU. More...

#include <CPUBuffer.h>

Inheritance diagram for ork::CPUBuffer:
ork::Buffer ork::Object

List of all members.

Public Member Functions

 CPUBuffer (const void *data=0)
 Creates a new CPU buffer with the given data.
virtual ~CPUBuffer ()
 Destroys this CPU buffer.

Protected Member Functions

virtual void bind (int target) const
 Binds this buffer to the given target.
virtual void * data (int offset) const
 Returns a pointer to the given offset in this data buffer.
virtual void unbind (int target) const
 Unbinds this buffer from the given target.

Detailed Description

A Buffer whose data is on the CPU.


Constructor & Destructor Documentation

ork::CPUBuffer::CPUBuffer ( const void *  data = 0  ) 

Creates a new CPU buffer with the given data.

Parameters:
data the buffer data. May be NULL.
virtual ork::CPUBuffer::~CPUBuffer (  )  [virtual]

Destroys this CPU buffer.

The buffer data itself is NOT destroyed.


Member Function Documentation

virtual void ork::CPUBuffer::bind ( int  target  )  const [protected, virtual]

Binds this buffer to the given target.

Parameters:
target an OpenGL buffer target (GL_ARRAY_BUFFER, etc).

Implements ork::Buffer.

virtual void* ork::CPUBuffer::data ( int  offset  )  const [protected, virtual]

Returns a pointer to the given offset in this data buffer.

Parameters:
offset an offset from the start of this buffer, in bytes.

Implements ork::Buffer.

virtual void ork::CPUBuffer::unbind ( int  target  )  const [protected, virtual]

Unbinds this buffer from the given target.

Parameters:
target an OpenGL buffer target (GL_ARRAY_BUFFER, etc).

Implements ork::Buffer.


Generated on Mon Oct 18 09:36:08 2010 for ork by  doxygen 1.6.1