24 #ifndef PXR_IMAGING_HGI_GL_HGI_H 25 #define PXR_IMAGING_HGI_GL_HGI_H 28 #include "pxr/imaging/hgiGL/api.h" 29 #include "pxr/imaging/hgiGL/capabilities.h" 30 #include "pxr/imaging/hgiGL/garbageCollector.h" 31 #include "pxr/imaging/hgi/hgi.h" 32 #include "pxr/imaging/hgi/tokens.h" 38 PXR_NAMESPACE_OPEN_SCOPE
42 using HgiGLOpsFn = std::function<void(
void)>;
43 using HgiGLOpsVector = std::vector<HgiGLOpsFn>;
206 bool _SubmitCmds(
HgiCmds* cmds, HgiSubmitWaitType wait)
override;
223 std::unique_ptr<HgiGLCapabilities> _capabilities;
233 #define HGIGL_API_VERSION 2 235 PXR_NAMESPACE_CLOSE_SCOPE
HGIGL_API void DestroyTexture(HgiTextureHandle *texHandle) override
Destroy a texture in rendering backend.
HGIGL_API HgiShaderFunctionHandle CreateShaderFunction(HgiShaderFunctionDesc const &desc) override
Create a new shader function.
Describes the properties needed to create a GPU texture view from an existing GPU texture object.
HGIGL_API HgiGLDevice * GetPrimaryDevice() const
HGIGL_API HgiBufferHandle CreateBuffer(HgiBufferDesc const &desc) override
Create a buffer in rendering backend.
HGIGL_API HgiTextureViewHandle CreateTextureView(HgiTextureViewDesc const &desc) override
Create a texture view in rendering backend.
The indirect command encoder is used to record the drawing primitives for a batch and capture the res...
HGIGL_API void SetContextArena(HgiGLContextArenaHandle const &arenaHandle)
Set the context arena to manage container resources (currently limited to framebuffer objects) for gr...
HGIGL_API HgiGLCapabilities const * GetCapabilities() const override
Returns the device-specific capabilities structure.
Describes the properties needed to create a GPU sampler.
HGIGL_API void DestroyComputePipeline(HgiComputePipelineHandle *pipeHandle) override
Destroy a compute pipeline state object.
Describes the properties needed to create a GPU texture.
OpenGL implementation of GPU device.
HGIGL_API void DestroyShaderProgram(HgiShaderProgramHandle *shaderProgramHandle) override
Destroy a shader program.
Handles garbage collection of opengl objects by delaying their destruction until those objects are no...
Token for efficient comparison, assignment, and hashing of known strings.
HGIGL_API void StartFrame() override
Optionally called by client app at the start of a new rendering frame.
HGIGL_API HgiTextureHandle CreateTexture(HgiTextureDesc const &desc) override
Create a texture in rendering backend.
HGIGL_API void DestroyContextArena(HgiGLContextArenaHandle *arenaHandle)
Destroy a context arena.
HGIGL_API bool IsBackendSupported() const override
HGIGL_API void DestroyShaderFunction(HgiShaderFunctionHandle *shaderFunctionHandle) override
Destroy a shader function.
OpenGL implementation of the Hydra Graphics Interface.
HGIGL_API HgiSamplerHandle CreateSampler(HgiSamplerDesc const &desc) override
Create a sampler in rendering backend.
Describes the properties needed to create a GPU compute pipeline.
HGIGL_API void DestroyGraphicsPipeline(HgiGraphicsPipelineHandle *pipeHandle) override
Destroy a graphics pipeline state object.
HGIGL_API HgiIndirectCommandEncoder * GetIndirectCommandEncoder() const override
Returns the device-specific indirect command buffer encoder or nullptr if not supported.
Describes the properties needed to create a GPU buffer.
HGIGL_API void EndFrame() override
Optionally called at the end of a rendering frame.
Describes the properties to begin a HgiGraphicsCmds.
HGIGL_API HgiGLContextArenaHandle CreateContextArena()
Reports the capabilities of the HgiGL device.
HGIGL_API HgiBlitCmdsUniquePtr CreateBlitCmds() override
Returns a BlitCmds object (for temporary use) that is ready to execute resource copy commands.
Describes the properties needed to create a GPU shader program.
Describes a set of resources that are bound to the GPU during encoding.
Hydra Graphics Interface.
HGIGL_API void DestroySampler(HgiSamplerHandle *smpHandle) override
Destroy a sampler in rendering backend.
HGIGL_API HgiGraphicsPipelineHandle CreateGraphicsPipeline(HgiGraphicsPipelineDesc const &pipeDesc) override
Create a new graphics pipeline state object.
HGIGL_API HgiComputePipelineHandle CreateComputePipeline(HgiComputePipelineDesc const &pipeDesc) override
Create a new compute pipeline state object.
HGIGL_API HgiGraphicsCmdsUniquePtr CreateGraphicsCmds(HgiGraphicsCmdsDesc const &desc) override
Returns a GraphicsCmds object (for temporary use) that is ready to record draw commands.
Describes the properties needed to create a GPU shader function.
HGIGL_API HgiResourceBindingsHandle CreateResourceBindings(HgiResourceBindingsDesc const &desc) override
Create a new resource binding object.
Describes the properties to construct a HgiComputeCmds.
HGIGL_API void DestroyBuffer(HgiBufferHandle *bufHandle) override
Destroy a buffer in rendering backend.
HGIGL_API void DestroyTextureView(HgiTextureViewHandle *viewHandle) override
Destroy a texture view in rendering backend.
Describes the properties needed to create a GPU pipeline.
HGIGL_API TfToken const & GetAPIName() const override
Return the name of the api (e.g.
HGIGL_API void DestroyResourceBindings(HgiResourceBindingsHandle *resHandle) override
Destroy a resource binding object.
Graphics commands are recorded in 'cmds' objects which are later submitted to hgi.
Handle that contains a hgi object and unique id.
HGIGL_API HgiShaderProgramHandle CreateShaderProgram(HgiShaderProgramDesc const &desc) override
Create a new shader program.
HGIGL_API HgiComputeCmdsUniquePtr CreateComputeCmds(HgiComputeCmdsDesc const &desc) override
Returns a ComputeCmds object (for temporary use) that is ready to record dispatch commands.