HDK
|
#include <glslProgram.h>
Public Types | |
typedef size_t | ID |
using | PopulateDescriptorCallback = std::function< void(HgiShaderFunctionDesc &computeDesc)> |
Public Member Functions | |
HDST_API | HdStGLSLProgram (TfToken const &role, HdStResourceRegistry *const registry) |
HDST_API | ~HdStGLSLProgram () |
HDST_API bool | CompileShader (HgiShaderStage stage, std::string const &source) |
Compile shader source for a shader stage. More... | |
HDST_API bool | CompileShader (HgiShaderFunctionDesc const &desc) |
Compile shader source for a shader stage from an HgiShaderFunctionDesc. 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... | |
HgiShaderProgramHandle const & | GetProgram () const |
Returns HgiShaderProgramHandle for the shader program. More... | |
TfToken const & | GetRole () const |
Returns the role of the GPU data in this resource. More... | |
Static Public Member Functions | |
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) |
static HDST_API HdStGLSLProgramSharedPtr | GetComputeProgram (TfToken const &shaderToken, HdStResourceRegistry *resourceRegistry, PopulateDescriptorCallback populateDescriptor) |
static HDST_API HdStGLSLProgramSharedPtr | GetComputeProgram (TfToken const &shaderToken, std::string const &defines, HdStResourceRegistry *resourceRegistry, PopulateDescriptorCallback populateDescriptor) |
static HDST_API HdStGLSLProgramSharedPtr | GetComputeProgram (TfToken const &shaderFileName, TfToken const &shaderToken, std::string const &defines, HdStResourceRegistry *resourceRegistry, PopulateDescriptorCallback populateDescriptor) |
An instance of a glsl program.
Definition at line 45 of file glslProgram.h.
typedef size_t HdStGLSLProgram::ID |
Definition at line 48 of file glslProgram.h.
using HdStGLSLProgram::PopulateDescriptorCallback = std::function<void(HgiShaderFunctionDesc &computeDesc)> |
Definition at line 87 of file glslProgram.h.
HDST_API HdStGLSLProgram::HdStGLSLProgram | ( | TfToken const & | role, |
HdStResourceRegistry *const | registry | ||
) |
HDST_API HdStGLSLProgram::~HdStGLSLProgram | ( | ) |
HDST_API bool HdStGLSLProgram::CompileShader | ( | HgiShaderStage | stage, |
std::string const & | source | ||
) |
Compile shader source for a shader stage.
HDST_API bool HdStGLSLProgram::CompileShader | ( | HgiShaderFunctionDesc const & | desc | ) |
Compile shader source for a shader stage from an HgiShaderFunctionDesc.
|
static |
Convenience method to get a shared compute shader program.
|
static |
|
static |
|
static |
|
static |
|
inline |
Returns HgiShaderProgramHandle for the shader program.
Definition at line 72 of file glslProgram.h.
|
inline |
Returns the role of the GPU data in this resource.
Definition at line 111 of file glslProgram.h.
HDST_API bool HdStGLSLProgram::Link | ( | ) |
Link the compiled shaders together.
HDST_API bool HdStGLSLProgram::Validate | ( | ) | const |
Validate if this program is a valid progam in the current context.