All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GLDrawContext Class Reference

OpenGL specialized DrawContext class. More...

#include <glDrawContext.h>

Inheritance diagram for GLDrawContext:
DrawContext

Public Types

typedef GLuint VertexBufferBinding
 
- Public Types inherited from DrawContext
typedef std::vector< PatchArrayPatchArrayVector
 
typedef std::vector< float > FVarData
 

Public Member Functions

virtual ~GLDrawContext ()
 
template<class VERTEX_BUFFER >
void UpdateVertexTexture (VERTEX_BUFFER *vbo)
 
GLuint GetPatchIndexBuffer () const
 Returns the GL texture buffer containing the patch control vertices array. More...
 
GLuint GetPatchParamTextureBuffer () const
 
GLuint GetVertexTextureBuffer () const
 Returns the GL texture buffer containing the vertex data. More...
 
GLuint GetVertexValenceTextureBuffer () const
 
GLuint GetQuadOffsetsTextureBuffer () const
 
GLuint GetFvarDataTextureBuffer () const
 Returns the GL texture buffer containing fvar data. More...
 
bool SetFVarDataTexture (Far::PatchTables const &patchTables, int fvarWidth, FVarData const &fvarData)
 
- Public Member Functions inherited from DrawContext
 DrawContext ()
 Constructor. More...
 
virtual ~DrawContext ()
 Descrtuctor. More...
 
bool IsAdaptive () const
 
PatchArrayVector const & GetPatchArrays () const
 

Static Public Member Functions

static GLDrawContextCreate (Far::PatchTables const *patchTables, int numVertexElements)
 Create an GLDraContext from Far::PatchTables. More...
 
static bool SupportsAdaptiveTessellation ()
 true if the GL version detected supports shader tessellation More...
 
- Static Public Member Functions inherited from DrawContext
static void ConvertPatchArrays (Far::PatchTables::PatchArrayVector const &farPatchArrays, DrawContext::PatchArrayVector &osdPatchArrays, int maxValence, int numElements)
 

Protected Member Functions

 GLDrawContext ()
 
bool create (Far::PatchTables const &patchTables, int numElements)
 
void updateVertexTexture (GLuint vbo)
 

Protected Attributes

GLuint _patchIndexBuffer
 
GLuint _patchParamTextureBuffer
 
GLuint _fvarDataTextureBuffer
 
GLuint _vertexTextureBuffer
 
GLuint _vertexValenceTextureBuffer
 
GLuint _quadOffsetsTextureBuffer
 
- Protected Attributes inherited from DrawContext
PatchArrayVector _patchArrays
 
bool _isAdaptive
 

Additional Inherited Members

- Static Protected Member Functions inherited from DrawContext
static void packFVarData (Far::PatchTables const &patchTables, int fvarWidth, FVarData const &src, FVarData &dst)
 

Detailed Description

OpenGL specialized DrawContext class.

GLDrawContext implements the OSD drawing interface with the OpenGL API. Some functionality may be disabled depending on compile and run-time driver support.

Contexts interface the serialized topological data pertaining to the geometric primitives with the capabilities of the selected discrete compute device.

Definition at line 54 of file glDrawContext.h.

Member Typedef Documentation

typedef GLuint VertexBufferBinding

Definition at line 56 of file glDrawContext.h.

Constructor & Destructor Documentation

virtual ~GLDrawContext ( )
virtual
GLDrawContext ( )
protected

Member Function Documentation

static GLDrawContext* Create ( Far::PatchTables const *  patchTables,
int  numVertexElements 
)
static

Create an GLDraContext from Far::PatchTables.

Parameters
patchTablesa valid set of Far::PatchTables
numVertexElementsthe number of vertex elements
bool create ( Far::PatchTables const &  patchTables,
int  numElements 
)
protected
GLuint GetFvarDataTextureBuffer ( ) const
inline

Returns the GL texture buffer containing fvar data.

Definition at line 110 of file glDrawContext.h.

GLuint GetPatchIndexBuffer ( ) const
inline

Returns the GL texture buffer containing the patch control vertices array.

Definition at line 82 of file glDrawContext.h.

GLuint GetPatchParamTextureBuffer ( ) const
inline

Returns the GL texture buffer containing the patch local parameterization data

Definition at line 88 of file glDrawContext.h.

GLuint GetQuadOffsetsTextureBuffer ( ) const
inline

Returns the GL texture buffer containing patch quad offsets data (only used by Gregory patches)

Definition at line 105 of file glDrawContext.h.

GLuint GetVertexTextureBuffer ( ) const
inline

Returns the GL texture buffer containing the vertex data.

Definition at line 93 of file glDrawContext.h.

GLuint GetVertexValenceTextureBuffer ( ) const
inline

Returns the GL texture buffer containing patch vertex valence data (only used by Gregory patches)

Definition at line 99 of file glDrawContext.h.

bool SetFVarDataTexture ( Far::PatchTables const &  patchTables,
int  fvarWidth,
FVarData const &  fvarData 
)

Sets face-varying data buffer

Parameters
patchTablesA valid set of Far::PatchTables
fvarWidthTotal face-varying primvar data width in fvarData
fvarDataVector containing the face-varying data
Returns
True if the operation was successful
static bool SupportsAdaptiveTessellation ( )
static

true if the GL version detected supports shader tessellation

void UpdateVertexTexture ( VERTEX_BUFFER *  vbo)
inline

Set vbo as a vertex texture (for gregory patch drawing)

Parameters
vbothe vertex buffer object to update

Definition at line 73 of file glDrawContext.h.

void updateVertexTexture ( GLuint  vbo)
protected

Member Data Documentation

GLuint _fvarDataTextureBuffer
protected

Definition at line 132 of file glDrawContext.h.

GLuint _patchIndexBuffer
protected

Definition at line 129 of file glDrawContext.h.

GLuint _patchParamTextureBuffer
protected

Definition at line 131 of file glDrawContext.h.

GLuint _quadOffsetsTextureBuffer
protected

Definition at line 136 of file glDrawContext.h.

GLuint _vertexTextureBuffer
protected

Definition at line 134 of file glDrawContext.h.

GLuint _vertexValenceTextureBuffer
protected

Definition at line 135 of file glDrawContext.h.


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