#include <shaderFunction.h>
OpenGL implementation of HgiShaderFunction
Definition at line 39 of file shaderFunction.h.
HGIGL_API HgiGLShaderFunction::~HgiGLShaderFunction |
( |
| ) |
|
|
override |
HGIGL_API size_t HgiGLShaderFunction::GetByteSizeOfResource |
( |
| ) |
const |
|
overridevirtual |
Returns the byte size of the GPU shader function. This can be helpful if the application wishes to tally up memory usage.
Implements HgiShaderFunction.
HGIGL_API uint64_t HgiGLShaderFunction::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 this returns the id<MTLFunction> as uint64_t. In Vulkan this returns the VkShaderModule as uint64_t. In DX12 this returns the ID3D12Resource pointer as uint64_t.
Implements HgiShaderFunction.
HGIGL_API uint32_t HgiGLShaderFunction::GetShaderId |
( |
| ) |
const |
Returns the gl resource id of the shader.
HGIGL_API bool HgiGLShaderFunction::IsValid |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following file: