HDK
|
#include <shaderProgram.h>
Public Member Functions | |
virtual HGI_API | ~HgiShaderProgram () |
HGI_API HgiShaderProgramDesc const & | GetDescriptor () const |
The descriptor describes the object. More... | |
virtual HGI_API bool | IsValid () const =0 |
Returns false if any shader compile errors occured. More... | |
virtual HGI_API std::string const & | GetCompileErrors ()=0 |
Returns shader compile errors. More... | |
virtual HGI_API HgiShaderFunctionHandleVector const & | GetShaderFunctions () const =0 |
Returns the shader functions that are part of this program. More... | |
virtual HGI_API size_t | GetByteSizeOfResource () const =0 |
virtual HGI_API uint64_t | GetRawResource () const =0 |
Protected Member Functions | |
HGI_API | HgiShaderProgram (HgiShaderProgramDesc const &desc) |
Protected Attributes | |
HgiShaderProgramDesc | _descriptor |
Represents a collection of shader functions. This object does not take ownership of the shader functions and does not destroy them automatically. The client must destroy the shader functions when the program is detroyed, because only the client knows if the shader functions are used by other shader programs.
Definition at line 80 of file shaderProgram.h.
|
virtual |
|
protected |
|
pure virtual |
Returns the byte size of the GPU shader program. APIs that do not have programs can return the combined byte size of the shader functions used by the program. This can be helpful if the application wishes to tally up memory usage.
Implemented in HgiGLShaderProgram.
|
pure virtual |
Returns shader compile errors.
Implemented in HgiGLShaderProgram.
HGI_API HgiShaderProgramDesc const& HgiShaderProgram::GetDescriptor | ( | ) | const |
The descriptor describes the object.
|
pure virtual |
This function returns the handle to the Hgi backend's gpu resource, cast to a uint64_t. Clients should avoid using this function and instead use Hgi base classes so that client code works with any Hgi platform. For transitioning code to Hgi, it can however we useful to directly access a platform's internal resource handles. There is no safety provided in using this. If you by accident pass a HgiMetal resource into an OpenGL call, bad things may happen. In OpenGL this returns the GLuint resource name. In Metal, Vulkan this returns 0.
Implemented in HgiGLShaderProgram.
|
pure virtual |
Returns the shader functions that are part of this program.
Implemented in HgiGLShaderProgram.
|
pure virtual |
Returns false if any shader compile errors occured.
Implemented in HgiGLShaderProgram.
|
protected |
Definition at line 125 of file shaderProgram.h.