| Support Forum G3D Web Page |
A 1D array stored on the GPU, backed by a buffer object.
More...
Public Member Functions | |
| ~BufferTexture () | |
| shared_ptr< GLPixelTransferBuffer > | buffer () |
| The underlying OpenGL Pixel Buffer Object. More... | |
| const ImageFormat * | format () const |
| GLenum | glslSamplerType () const |
| The sampler type this type of data corresponds to... More... | |
| unsigned int | openGLID () const |
| unsigned int | openGLTextureTarget () const |
The OpenGL texture target this binds to (always GL_TEXTURE_BUFFER) More... | |
| int | size () const |
| Number of pixels (underlying buffer width x height) More... | |
| bool | someTexelsInaccessible () const |
| Returns true if the buffer associated with this texture has more texels than GL_MAX_TEXTURE_BUFFER_SIZE. More... | |
Static Public Member Functions | |
| static shared_ptr< BufferTexture > | create (const String &name, const shared_ptr< GLPixelTransferBuffer > &buffer) |
A 1D array stored on the GPU, backed by a buffer object.
Commonly used as storage for GL Compute data.
Abstraction of OpenGL buffer textures. Buffer textures have a different size limit than normal 1D textures, have a special creation path, and are more or less special cases in every way. Instead of shoehorning them into G3D::Texture, we created this lightweight wrapper. This decision may be revisited in the near future, and the functionality rolled into G3D::Texture (or G3D::GLPixelTransferBuffer).
It is valid to create a buffer texture from a buffer with a larger number of texels than GL_MAX_TEXTURE_BUFFER_SIZE, but one can only access the first GL_MAX_TEXTURE_BUFFER_SIZE texels from the buffer texture. Use someTexelsInaccessible() to check if there are inaccessible texels in this object because of that.
Currently only allowed to be created from a GLPixelTransferBuffer... this will change in the near future
| G3D::BufferTexture::~BufferTexture | ( | ) |
|
inline |
The underlying OpenGL Pixel Buffer Object.
|
static |
| const ImageFormat* G3D::BufferTexture::format | ( | ) | const |
| GLenum G3D::BufferTexture::glslSamplerType | ( | ) | const |
The sampler type this type of data corresponds to...
used for binding to shaders
|
inline |
| unsigned int G3D::BufferTexture::openGLTextureTarget | ( | ) | const |
The OpenGL texture target this binds to (always GL_TEXTURE_BUFFER)
| int G3D::BufferTexture::size | ( | ) | const |
Number of pixels (underlying buffer width x height)
| bool G3D::BufferTexture::someTexelsInaccessible | ( | ) | const |
Returns true if the buffer associated with this texture has more texels than GL_MAX_TEXTURE_BUFFER_SIZE.
This is valid, but the texels out of this range will be inaccessible in shaders.
1.8.15