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/garbageCollector.h"
30 #include "pxr/imaging/hgi/hgi.h"
31 #include "pxr/imaging/hgi/tokens.h"
36 PXR_NAMESPACE_OPEN_SCOPE
40 using HgiGLOpsFn = std::function<void(void)>;
41 using HgiGLOpsVector = std::vector<HgiGLOpsFn>;
154 bool _SubmitCmds(
HgiCmds* cmds, HgiSubmitWaitType wait)
override;
157 HgiGL & operator=(
const HgiGL&) =
delete;
158 HgiGL(
const HgiGL&) =
delete;
170 HgiGLDevice* _device;
175 PXR_NAMESPACE_CLOSE_SCOPE
HGIGL_API void DestroyTexture(HgiTextureHandle *texHandle) override
Destroy a texture in rendering backend.
HGIGL_API HgiGLDevice * GetPrimaryDevice() const
Returns the opengl device.
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 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.
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.
HGIGL_API void DestroyShaderProgram(HgiShaderProgramHandle *shaderProgramHandle) override
Destroy a shader program.
HGIGL_API HgiComputeCmdsUniquePtr CreateComputeCmds() override
Returns a ComputeCmds object (for temporary use) that is ready to record dispatch commands...
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 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.
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 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.
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.