Texture Buffer Object. This is a special 1D texture that VBO-style initialized. The main differences from general 1D texture:
More...
|
| OpenGl_TextureBuffer () |
| Create uninitialized TBO.
|
|
virtual | ~OpenGl_TextureBuffer () |
| Destroy object, will throw exception if GPU memory not released with Release() before.
|
|
virtual unsigned int | GetTarget () const override |
| Override VBO target.
|
|
bool | IsValid () const |
| Returns true if TBO is valid. Notice that no any real GL call is performed!
|
|
virtual void | Release (OpenGl_Context *theGlCtx) override |
| Destroy object - will release GPU memory if any.
|
|
bool | Create (const Handle< OpenGl_Context > &theGlCtx) override |
| 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 unsigned int theComponentsNb, const Standard_Integer theElemsNb, const float *theData) |
| Perform TBO initialization with specified data. Existing data will be deleted.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const unsigned int *theData) |
| Perform TBO initialization with specified data. Existing data will be deleted.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const unsigned short *theData) |
| Perform TBO initialization with specified data. Existing data will be deleted.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const Standard_Byte *theData) |
| Perform TBO initialization with specified data. Existing data will be deleted.
|
|
void | BindTexture (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_TextureUnit theTextureUnit) const |
| Bind TBO to specified Texture Unit.
|
|
void | UnbindTexture (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_TextureUnit theTextureUnit) const |
| Unbind TBO.
|
|
unsigned int | TextureId () const |
| Returns name of TBO.
|
|
unsigned int | TextureFormat () const |
| Returns internal texture format.
|
|
| OpenGl_Buffer () |
| Create uninitialized buffer.
|
|
virtual | ~OpenGl_Buffer () |
| Destroy object.
|
|
virtual bool | IsVirtual () const |
| Return TRUE if this is a virtual (for backward compatibility) VBO object.
|
|
bool | IsValid () const |
|
unsigned int | GetComponentsNb () const |
|
Standard_Integer | GetElemsNb () const |
|
void | SetElemsNb (Standard_Integer theNbElems) |
| Overrides the number of vertex attributes / number of vertexes. It is up to user specifying this number correct (e.g. below initial value)!
|
|
unsigned int | GetDataType () const |
|
Standard_Byte * | GetDataOffset () const |
|
virtual void | Bind (const Handle< OpenGl_Context > &theGlCtx) const |
| Bind this buffer object.
|
|
virtual void | Unbind (const Handle< OpenGl_Context > &theGlCtx) const |
| Unbind this buffer object.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const float *theData) |
| Notice that buffer object will be unbound after this call.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const unsigned int *theData) |
| Notice that buffer object will be unbound after this call.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const unsigned short *theData) |
| Notice that buffer object will be unbound after this call.
|
|
bool | Init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const Standard_Byte *theData) |
| Notice that buffer object will be unbound after this call.
|
|
bool | SubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, const float *theData) |
| Notice that buffer object will be unbound after this call. Function replaces portion of data within this buffer object using glBufferSubData(). The buffer object should be initialized before call.
|
|
bool | GetSubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, float *theData) |
| Read back buffer sub-range. Notice that buffer object will be unbound after this call. Function reads portion of data from this buffer object using glGetBufferSubData().
|
|
bool | SubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, const unsigned int *theData) |
| Notice that buffer object will be unbound after this call. Function replaces portion of data within this buffer object using glBufferSubData(). The buffer object should be initialized before call.
|
|
bool | GetSubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, unsigned int *theData) |
| Read back buffer sub-range. Notice that buffer object will be unbound after this call. Function reads portion of data from this buffer object using glGetBufferSubData().
|
|
bool | SubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, const unsigned short *theData) |
| Notice that buffer object will be unbound after this call. Function replaces portion of data within this buffer object using glBufferSubData(). The buffer object should be initialized before call.
|
|
bool | GetSubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, unsigned short *theData) |
| Read back buffer sub-range. Notice that buffer object will be unbound after this call. Function reads portion of data from this buffer object using glGetBufferSubData().
|
|
bool | SubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, const Standard_Byte *theData) |
| Notice that buffer object will be unbound after this call. Function replaces portion of data within this buffer object using glBufferSubData(). The buffer object should be initialized before call.
|
|
bool | GetSubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, Standard_Byte *theData) |
| Read back buffer sub-range. Notice that buffer object will be unbound after this call. Function reads portion of data from this buffer object using glGetBufferSubData().
|
|
virtual Standard_Size | EstimatedDataSize () const override |
| Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
|
|
virtual bool | init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const void *theData, const unsigned int theDataType, const Standard_Integer theStride) |
| Initialize buffer with new data.
|
|
bool | init (const Handle< OpenGl_Context > &theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, const void *theData, const unsigned int theDataType) |
| Initialize buffer with new data.
|
|
virtual bool | subData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, const void *theData, const unsigned int theDataType) |
| Update part of the buffer with new data.
|
|
virtual bool | getSubData (const Handle< OpenGl_Context > &theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, void *theData, const unsigned int theDataType) |
| Read back buffer sub-range.
|
|
virtual void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const override |
| Dumps the content of me into the stream.
|
|
| OpenGl_Resource () |
| Empty constructor.
|
|
virtual | ~OpenGl_Resource () |
| Destructor. Inheritors should call Clean (NULL) within it.
|
|
Public Member Functions inherited from Standard_Transient |
| Standard_Transient () |
| Empty constructor.
|
|
| Standard_Transient (const Standard_Transient &) |
| Copy constructor – does nothing.
|
|
Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter.
|
|
virtual | ~Standard_Transient () |
| Destructor must be virtual.
|
|
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object.
|
|
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type.
|
|
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName.
|
|
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
|
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
|
Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
|
|
Standard_Integer | GetRefCount () const noexcept |
| Get the reference counter of this object.
|
|
void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object.
|
|
Standard_Integer | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value.
|
|
virtual void | Delete () const |
| Memory deallocator for transient classes.
|
|
Texture Buffer Object. This is a special 1D texture that VBO-style initialized. The main differences from general 1D texture:
- 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.