A Buffer whose data is on the CPU. More...
#include <CPUBuffer.h>
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. |
A Buffer whose data is on the CPU.
ork::CPUBuffer::CPUBuffer | ( | const void * | data = 0 |
) |
Creates a new CPU buffer with the given data.
data | the buffer data. May be NULL. |
virtual ork::CPUBuffer::~CPUBuffer | ( | ) | [virtual] |
Destroys this CPU buffer.
The buffer data itself is NOT destroyed.
virtual void ork::CPUBuffer::bind | ( | int | target | ) | const [protected, virtual] |
Binds this buffer to the given target.
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.
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.
target | an OpenGL buffer target (GL_ARRAY_BUFFER, etc). |
Implements ork::Buffer.