Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a buffer of vertex attributes stored in GPU memory. More...
#include <omGraphicsOpenGLBuffer.h>
Public Member Functions | |
~OpenGLBuffer () | |
Destroy this vertex buffer and all state associated with it. More... | |
virtual BufferUsage | getUsage () const |
Return the current expected usage pattern for this hardware attribute buffer. More... | |
virtual Size | getCapacity () const |
Return the number of bytes that this buffer is able to hold. More... | |
virtual Bool | setCapacity (Size newCapacityInBytes) |
Set the number of bytes that this buffer is able to hold. More... | |
virtual Bool | setCapacity (Size newCapacityInBytes, BufferUsage newUsage) |
Set the number of bytes that this buffer is able to hold. More... | |
virtual Bool | reallocate () |
Reallocate this buffer's data store using its current capacity. More... | |
virtual Bool | reallocate (BufferUsage newUsage) |
Reallocate this buffer's data store using its current capacity, changing its usage type. More... | |
virtual Bool | getData (void *data, Size &numBytes) const |
Read the specified number of bytes from the buffer into the output data pointer. More... | |
virtual Bool | setData (const void *data, Size numBytes, BufferUsage newUsage=BufferUsage::STATIC) |
Replace the contents of this buffer with the specified data. More... | |
virtual Bool | updateData (const void *data, Size numBytes, Index startIndex=0) |
Update a region of this buffer with the specified data. More... | |
virtual void * | map (BufferAccessType accessType) |
Map this buffer's data store to the main memory address space and return a pointer to it. More... | |
virtual void * | mapRange (BufferAccessType accessType, Index byteOffset, Size numBytes) |
Map this buffer's data store to the main memory address space and return a pointer to it. More... | |
virtual void | unmap () const |
Unmap this buffer's data store from the main memory address space. More... | |
virtual Bool | isMapped () const |
Return whether or not this attribute buffer is currently mapped to main memory. More... | |
virtual Bool | isValid () const |
Return whether or not the state of this buffer is valid and able to be used for rendering. More... | |
OpenGLID | getID () const |
Get a unique integral identifier for this vertex buffer. More... | |
Public Member Functions inherited from om::graphics::buffers::DeviceBuffer | |
const BufferType & | getType () const |
Return the type of attribute buffer that this device buffer represents. More... | |
Public Member Functions inherited from om::graphics::devices::DeviceResource | |
virtual | ~DeviceResource () |
Destroy a device object, releasing all internal state. More... | |
GraphicsContext * | getContext () const |
Return a pointer to the graphics context associated with this DeviceResource. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from om::graphics::buffers::DeviceBuffer | |
DeviceBuffer (devices::GraphicsContext *newContext, BufferType newBufferType) | |
Create a device attribute buffer for the specified context with the given buffer type. More... | |
Protected Member Functions inherited from om::graphics::devices::DeviceResource | |
DeviceResource (GraphicsContext *newContext) | |
Create a new device object that is associated with the specified graphics context. More... | |
Protected Attributes inherited from om::graphics::buffers::DeviceBuffer | |
BufferType | bufferType |
An enum value that is set by subclasses that specifies the kind of attribute buffer this is. More... | |
A class that represents a buffer of vertex attributes stored in GPU memory.
This class allows attribute data to be stored in the graphics card's RAM for faster access. It is analogous to the Texture class that performs the same function but for pixel data.
om::graphics::devices::opengl::OpenGLBuffer::~OpenGLBuffer | ( | ) |
Destroy this vertex buffer and all state associated with it.
|
virtual |
Return the current expected usage pattern for this hardware attribute buffer.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Return the number of bytes that this buffer is able to hold.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Set the number of bytes that this buffer is able to hold.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Set the number of bytes that this buffer is able to hold.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Reallocate this buffer's data store using its current capacity.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Reallocate this buffer's data store using its current capacity, changing its usage type.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Read the specified number of bytes from the buffer into the output data pointer.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Replace the contents of this buffer with the specified data.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Update a region of this buffer with the specified data.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Map this buffer's data store to the main memory address space and return a pointer to it.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Map this buffer's data store to the main memory address space and return a pointer to it.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Unmap this buffer's data store from the main memory address space.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Return whether or not this attribute buffer is currently mapped to main memory.
Implements om::graphics::buffers::DeviceBuffer.
|
virtual |
Return whether or not the state of this buffer is valid and able to be used for rendering.
Implements om::graphics::devices::DeviceResource.
|
inline |
Get a unique integral identifier for this vertex buffer.