Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes | Protected Attributes
OpenGl_TextureBufferArb Class Reference

Texture Buffer Object. This is a special 1D texture that VBO-style initialized. The main differences from general 1D texture: More...

#include <OpenGl_TextureBufferArb.hxx>

Inheritance diagram for OpenGl_TextureBufferArb:
Inheritance graph
[legend]

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

Detailed Description

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.


Constructor & Destructor Documentation


Member Function Documentation

Reimplemented from OpenGl_VertexBuffer.

virtual GLenum OpenGl_TextureBufferArb::GetTarget ( ) const [virtual]

Reimplemented from OpenGl_VertexBuffer.

bool OpenGl_TextureBufferArb::Init ( const Handle< OpenGl_Context > &  theGlCtx,
const GLuint  theComponentsNb,
const GLsizei  theElemsNb,
const GLfloat theData 
)

Reimplemented from OpenGl_VertexBuffer.

bool OpenGl_TextureBufferArb::IsValid ( ) const [inline]

Reimplemented from OpenGl_VertexBuffer.

virtual void OpenGl_TextureBufferArb::Release ( const OpenGl_Context theGlCtx) [virtual]

Reimplemented from OpenGl_VertexBuffer.


Field Documentation


The documentation for this class was generated from the following file: