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

An instance of a glsl program. More...

Public Types

typedef size_t ID
 

Public Member Functions

HDST_API HdStGLSLProgram (TfToken const &role)
 
HDST_API bool CompileShader (GLenum type, std::string const &source)
 Compile shader source of type. More...
 
HDST_API bool Link ()
 Link the compiled shaders together. More...
 
HDST_API bool Validate () const
 Validate if this program is a valid progam in the current context. More...
 
HdStResourceGL const & GetProgram () const
 Returns HdResource of the program object. More...
 
HdStResourceGL const & GetGlobalUniformBuffer () const
 Returns HdResource of the global uniform buffer object for this program. More...
 

Static Public Member Functions

static HDST_API ID ComputeHash (TfToken const &sourceFile)
 Returns the hash value of the program for sourceFile. More...
 
static HDST_API
HdStGLSLProgramSharedPtr 
GetComputeProgram (TfToken const &shaderToken, HdStResourceRegistry *resourceRegistry)
 Convenience method to get a shared compute shader program. More...
 
static HDST_API
HdStGLSLProgramSharedPtr 
GetComputeProgram (TfToken const &shaderFileName, TfToken const &shaderToken, HdStResourceRegistry *resourceRegistry)
 

Detailed Description

An instance of a glsl program.

Definition at line 44 of file glslProgram.h.

Member Function Documentation

HDST_API bool CompileShader ( GLenum  type,
std::string const &  source 
)

Compile shader source of type.

static HDST_API ID ComputeHash ( TfToken const &  sourceFile)
static

Returns the hash value of the program for sourceFile.

static HDST_API HdStGLSLProgramSharedPtr GetComputeProgram ( TfToken const &  shaderToken,
HdStResourceRegistry resourceRegistry 
)
static

Convenience method to get a shared compute shader program.

HdStResourceGL const& GetGlobalUniformBuffer ( ) const
inline

Returns HdResource of the global uniform buffer object for this program.

Definition at line 74 of file glslProgram.h.

HdStResourceGL const& GetProgram ( ) const
inline

Returns HdResource of the program object.

Definition at line 71 of file glslProgram.h.

HDST_API bool Link ( )

Link the compiled shaders together.

HDST_API bool Validate ( ) const

Validate if this program is a valid progam in the current context.


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