Texture Buffer Object. This is a special 1D texture that VBO-style initialized. The main differences from general 1D texture:
More...
Public Member Functions |
| OpenGl_TextureBufferArb () |
| Create uninitialized TBO.
|
virtual | ~OpenGl_TextureBufferArb () |
| Destroy object, will throw exception if GPU memory not released with Release() before.
|
virtual GLenum | GetTarget () const |
| Override VBO target.
|
bool | IsValid () const |
| Returns true if TBO is valid. Notice that no any real GL call is performed!
|
virtual void | Release (const OpenGl_Context *theGlCtx) |
| Destroy object - will release GPU memory if any.
|
bool | Create (const Handle< OpenGl_Context > &theGlCtx) |
| Creates VBO and Texture names (ids) if not yet generated. Data should be initialized by another method.
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const GLuint theComponentsNb, const GLsizei theElemsNb, const GLfloat *theData) |
| Perform TBO initialization with specified data. Existing data will be deleted.
|
void | BindTexture (const Handle< OpenGl_Context > &theGlCtx, const GLenum theTextureUnit=GL_TEXTURE0) const |
| Bind TBO to specified Texture Unit.
|
void | UnbindTexture (const Handle< OpenGl_Context > &theGlCtx, const GLenum theTextureUnit=GL_TEXTURE0) const |
| Unbind TBO.
|
Static Public Attributes |
static const GLuint | NO_TEXTURE = 0 |
| Helpful constants.
|
Protected Attributes |
GLuint | myTextureId |
| texture id
|
GLenum | myTexFormat |
| internal texture format
|
- no interpolation between field;
- greater sizes;
- special sampler object in GLSL shader to access data by index.
Notice that though TBO is inherited from VBO this is to unify design user shouldn't cast it to base class and all really useful methods are declared in this class.