24 #ifndef PXR_IMAGING_HD_ST_GLSL_PROGRAM_H
25 #define PXR_IMAGING_HD_ST_GLSL_PROGRAM_H
28 #include "pxr/imaging/hd/version.h"
29 #include "pxr/imaging/hdSt/api.h"
30 #include "pxr/imaging/hgi/buffer.h"
31 #include "pxr/imaging/hgi/shaderProgram.h"
32 #include "pxr/imaging/hgi/enums.h"
34 PXR_NAMESPACE_OPEN_SCOPE
37 using HdStGLSLProgramSharedPtr = std::shared_ptr<class HdStGLSLProgram>;
57 bool CompileShader(HgiShaderStage stage, std::string
const & source);
82 using PopulateDescriptorCallback =
83 std::function<void(HgiShaderFunctionDesc &computeDesc)>;
89 PopulateDescriptorCallback populateDescriptor);
94 std::string
const &defines,
96 PopulateDescriptorCallback populateDescriptor);
116 PXR_NAMESPACE_CLOSE_SCOPE
118 #endif // PXR_IMAGING_HD_ST_GLSL_PROGRAM_H
TfToken const & GetRole() const
Returns the role of the GPU data in this resource.
An instance of a glsl program.
Token for efficient comparison, assignment, and hashing of known strings.
HgiShaderProgramHandle const & GetProgram() const
Returns HdResource of the program object.
A central registry of all GPU resources.
HDST_API bool Link()
Link the compiled shaders together.
HDST_API bool CompileShader(HgiShaderStage stage, std::string const &source)
Compile shader source for a shader stage.
Describes the properties needed to create a GPU shader program.
static HDST_API HdStGLSLProgramSharedPtr GetComputeProgram(TfToken const &shaderToken, HdStResourceRegistry *resourceRegistry)
Convenience method to get a shared compute shader program.
HDST_API bool Validate() const
Validate if this program is a valid progam in the current context.