A buffer texture. More...
#include <TextureBuffer.h>
Public Member Functions | |
TextureBuffer (TextureInternalFormat tf, ptr< GPUBuffer > pixels) | |
Creates a new buffer texture. | |
virtual | ~TextureBuffer () |
Destroys this buffer texture. | |
int | getWidth () |
Returns the width of this texture. | |
ptr< GPUBuffer > | getBuffer () |
Returns the buffer holding the texture's texel array. | |
Protected Attributes | |
int | w |
The width of this texture. | |
ptr< GPUBuffer > | b |
The buffer holding the texture's texel array. |
A buffer texture.
A buffer texture is similar to a one-dimensional texture. However, unlike other texture types, the texel array is not stored as part of the texture. Instead, a buffer object is attached to a buffer texture and the texel array is taken from the data store of an attached buffer object. When the contents of a buffer object's data store are modified, those changes are reflected in the contents of any buffer texture to which the buffer object is attached. Also unlike other textures, buffer textures do not have multiple image levels; only a single data store is available.
Creates a new buffer texture.
tf | texture data format in 'pixels'. | |
pixels | the buffer holding the texture's texel array. |
virtual ork::TextureBuffer::~TextureBuffer | ( | ) | [virtual] |
Destroys this buffer texture.
Returns the buffer holding the texture's texel array.
int ork::TextureBuffer::getWidth | ( | ) |
Returns the width of this texture.
ptr<GPUBuffer> ork::TextureBuffer::b [protected] |
The buffer holding the texture's texel array.
int ork::TextureBuffer::w [protected] |
The width of this texture.