Open CASCADE Technology  6.8.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
OpenGl_PrimitiveArray Class Reference

Class for rendering of arbitrary primitive array. More...

#include <OpenGl_PrimitiveArray.hxx>

Inheritance diagram for OpenGl_PrimitiveArray:
Inheritance graph
[legend]

Public Types

enum  { DRAW_MODE_NONE = -1 }
 

Public Member Functions

 OpenGl_PrimitiveArray (const OpenGl_GraphicDriver *theDriver, const Graphic3d_TypeOfPrimitiveArray theType, const Handle< Graphic3d_IndexBuffer > &theIndices, const Handle< Graphic3d_Buffer > &theAttribs, const Handle< Graphic3d_BoundBuffer > &theBounds)
 Default constructor. More...
 
virtual void Render (const Handle< OpenGl_Workspace > &theWorkspace) const
 Render primitives to the window. More...
 
virtual void Release (OpenGl_Context *theContext)
 Release GPU resources. Pointer to the context is used because this method might be called when the context is already being destroyed and usage of a handle would be unsafe. More...
 
GLint DrawMode () const
 
const Handle
< Graphic3d_IndexBuffer > & 
Indices () const
 
const Handle< Graphic3d_Buffer > & Attributes () const
 
const Handle
< Graphic3d_BoundBuffer > & 
Bounds () const
 
const Standard_Size GetUID () const
 Returns unique ID of primitive array. More...
 
- Public Member Functions inherited from OpenGl_Element
 OpenGl_Element ()
 
Standard_Boolean RenderFiltered (const Handle< OpenGl_Workspace > &theWorkspace, const Handle< OpenGl_RenderFilter > &theFilter) const
 Render element if it passes the filtering procedure. This method should be used for elements which can be used in scope of rendering algorithms. E.g. elements of groups during recursive rendering. If render filter is null, pure rendering is performed. More...
 

Protected Member Functions

virtual ~OpenGl_PrimitiveArray ()
 Destructor. More...
 
- Protected Member Functions inherited from OpenGl_Element
virtual ~OpenGl_Element ()
 

Protected Attributes

Handle< OpenGl_VertexBuffermyVboIndices
 
Handle< OpenGl_VertexBuffermyVboAttribs
 
Handle< Graphic3d_IndexBuffermyIndices
 
Handle< Graphic3d_BuffermyAttribs
 
Handle< Graphic3d_BoundBuffermyBounds
 
GLint myDrawMode
 
Standard_Boolean myIsVboInit
 
Standard_Size myUID
 Unique ID of primitive array. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenGl_Element
template<typename theResource_t >
static void Destroy (OpenGl_Context *theContext, theResource_t *&theElement)
 Pointer to the context is used because this method might be called when the context is already being destroyed and usage of a handle would be unsafe. More...
 

Detailed Description

Class for rendering of arbitrary primitive array.

Member Enumeration Documentation

anonymous enum
Enumerator
DRAW_MODE_NONE 

Constructor & Destructor Documentation

OpenGl_PrimitiveArray::OpenGl_PrimitiveArray ( const OpenGl_GraphicDriver theDriver,
const Graphic3d_TypeOfPrimitiveArray  theType,
const Handle< Graphic3d_IndexBuffer > &  theIndices,
const Handle< Graphic3d_Buffer > &  theAttribs,
const Handle< Graphic3d_BoundBuffer > &  theBounds 
)

Default constructor.

virtual OpenGl_PrimitiveArray::~OpenGl_PrimitiveArray ( )
protectedvirtual

Destructor.

Member Function Documentation

const Handle< Graphic3d_Buffer >& OpenGl_PrimitiveArray::Attributes ( ) const
inline
Returns
attributes array
const Handle< Graphic3d_BoundBuffer >& OpenGl_PrimitiveArray::Bounds ( ) const
inline
Returns
bounds array
GLint OpenGl_PrimitiveArray::DrawMode ( ) const
inline
Returns
primitive type (GL_LINES, GL_TRIANGLES and others)
const Standard_Size OpenGl_PrimitiveArray::GetUID ( ) const
inline

Returns unique ID of primitive array.

const Handle< Graphic3d_IndexBuffer >& OpenGl_PrimitiveArray::Indices ( ) const
inline
Returns
indices array
virtual void OpenGl_PrimitiveArray::Release ( OpenGl_Context theContext)
virtual

Release GPU resources. Pointer to the context is used because this method might be called when the context is already being destroyed and usage of a handle would be unsafe.

Implements OpenGl_Element.

Reimplemented in OpenGl_Quadric.

virtual void OpenGl_PrimitiveArray::Render ( const Handle< OpenGl_Workspace > &  theWorkspace) const
virtual

Render primitives to the window.

Implements OpenGl_Element.

Field Documentation

Handle< Graphic3d_Buffer > OpenGl_PrimitiveArray::myAttribs
mutableprotected
Handle< Graphic3d_BoundBuffer > OpenGl_PrimitiveArray::myBounds
mutableprotected
GLint OpenGl_PrimitiveArray::myDrawMode
protected
Handle< Graphic3d_IndexBuffer > OpenGl_PrimitiveArray::myIndices
mutableprotected
Standard_Boolean OpenGl_PrimitiveArray::myIsVboInit
mutableprotected
Standard_Size OpenGl_PrimitiveArray::myUID
protected

Unique ID of primitive array.

Handle< OpenGl_VertexBuffer > OpenGl_PrimitiveArray::myVboAttribs
mutableprotected
Handle< OpenGl_VertexBuffer > OpenGl_PrimitiveArray::myVboIndices
mutableprotected

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