#include <shaderProgram.h>
OpenGL implementation of HgiShaderProgram
Definition at line 42 of file shaderProgram.h.
HGIGL_API HgiGLShaderProgram::~HgiGLShaderProgram |
( |
| ) |
|
|
override |
HGIGL_API size_t HgiGLShaderProgram::GetByteSizeOfResource |
( |
| ) |
const |
|
overridevirtual |
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.
Implements HgiShaderProgram.
HGIGL_API uint32_t HgiGLShaderProgram::GetProgramId |
( |
| ) |
const |
Returns the gl resource id of the program.
HGIGL_API uint64_t HgiGLShaderProgram::GetRawResource |
( |
| ) |
const |
|
overridevirtual |
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.
Implements HgiShaderProgram.
Returns the shader functions that are part of this program.
Implements HgiShaderProgram.
HGIGL_API uint32_t HgiGLShaderProgram::GetUniformBuffer |
( |
size_t |
sizeHint | ) |
|
Returns the gl resource for the uniform block of this shader program. This uniform block is used to store some per-shader values, such as indices or offsets into other buffers. See also Hgi::SetConstantValues. 'sizeHint' is used to store the byte size of the uniform buffer, but this fn does not actually allocate the data storage for the buffer.
HGIGL_API bool HgiGLShaderProgram::IsValid |
( |
| ) |
const |
|
overridevirtual |
Returns false if any shader compile errors occured.
Implements HgiShaderProgram.
The documentation for this class was generated from the following file: