Open CASCADE Technology 7.8.0
|
Compatibility layer for old OpenGL without VBO. Make sure to pass pointer from GetDataOffset() instead of NULL. Method GetDataOffset() returns pointer to real data in this class (while base class OpenGl_VertexBuffer always return NULL). More...
#include <OpenGl_BufferCompatT.hxx>
Public Member Functions | |
OpenGl_BufferCompatT () | |
Create uninitialized VBO. | |
virtual | ~OpenGl_BufferCompatT () |
Destroy object. | |
virtual bool | IsVirtual () const override |
Return TRUE. | |
bool | Create (const Handle< OpenGl_Context > &theGlCtx) override |
Creates VBO name (id) if not yet generated. Data should be initialized by another method. | |
virtual void | Release (OpenGl_Context *theGlCtx) override |
Destroy object - will release memory if any. | |
virtual void | Bind (const Handle< OpenGl_Context > &) const override |
Bind this VBO. | |
virtual void | Unbind (const Handle< OpenGl_Context > &) const override |
Unbind this VBO. | |
Compatibility layer for old OpenGL without VBO. Make sure to pass pointer from GetDataOffset() instead of NULL. Method GetDataOffset() returns pointer to real data in this class (while base class OpenGl_VertexBuffer always return NULL).
Methods Bind()/Unbind() do nothing (do not affect OpenGL state) and ::GetTarget() is never used. For this reason there is no analog for OpenGl_IndexBuffer. Just pass GetDataOffset() to glDrawElements() directly as last argument.
Class overrides methods init() and subData() to copy data into own memory buffer. Extra method initLink() might be used to pass existing buffer through handle without copying the data.
Method Create() creates dummy identifier for this object which should NOT be passed to OpenGL functions.
|
inline |
Create uninitialized VBO.
|
inlinevirtual |
Destroy object.
|
inlineoverridevirtual |
Bind this VBO.
|
inlineoverride |
Creates VBO name (id) if not yet generated. Data should be initialized by another method.
|
inlineoverridevirtual |
Read back buffer sub-range.
|
inlineoverridevirtual |
Initialize buffer with new data (data will be copied).
|
inline |
Initialize buffer with existing data. Data will NOT be copied by this method!
|
inlineoverridevirtual |
Return TRUE.
|
inlineoverridevirtual |
Destroy object - will release memory if any.
|
inlineoverridevirtual |
Update part of the buffer with new data.
|
inlineoverridevirtual |
Unbind this VBO.
|
protected |
buffer data