24 #ifndef PXR_IMAGING_HGI_GL_GRAPHICS_CMDS_H
25 #define PXR_IMAGING_HGI_GL_GRAPHICS_CMDS_H
29 #include "pxr/imaging/hgi/graphicsCmds.h"
30 #include "pxr/imaging/hgiGL/api.h"
31 #include "pxr/imaging/hgiGL/hgi.h"
34 PXR_NAMESPACE_OPEN_SCOPE
78 HgiShaderStage stages,
81 const void* data)
override;
85 uint32_t firstBinding,
86 HgiBufferHandleVector
const& buffers,
87 std::vector<uint32_t>
const& byteOffsets)
override;
93 uint32_t instanceCount)
override;
98 uint32_t drawBufferOffset,
100 uint32_t stride)
override;
106 uint32_t indexBufferByteOffset,
107 uint32_t vertexOffset,
108 uint32_t instanceCount)
override;
114 uint32_t drawBufferOffset,
116 uint32_t stride)
override;
130 bool _Submit(
Hgi* hgi, HgiSubmitWaitType wait)
override;
133 HgiGLGraphicsCmds() =
delete;
134 HgiGLGraphicsCmds & operator=(
const HgiGLGraphicsCmds&) =
delete;
135 HgiGLGraphicsCmds(
const HgiGLGraphicsCmds&) =
delete;
138 void _AddResolveToOps(HgiGLDevice* device);
142 HgiPrimitiveType _primitiveType;
150 PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 4 int components.
HGIGL_API void SetConstantValues(HgiGraphicsPipelineHandle pipeline, HgiShaderStage stages, uint32_t bindIndex, uint32_t byteSize, const void *data) override
Set Push / Function constants.
HGIGL_API void DrawIndirect(HgiBufferHandle const &drawParameterBuffer, uint32_t drawBufferOffset, uint32_t drawCount, uint32_t stride) override
Records a multi-draw command that reads the draw parameters from a provided drawParameterBuffer.
A graphics API independent abstraction of graphics commands.
HGIGL_API void MemoryBarrier(HgiMemoryBarrier barrier) override
Inserts a barrier so that data written to memory by commands before the barrier is available to comma...
HGIGL_API void BindResources(HgiResourceBindingsHandle resources) override
Bind resources such as textures and uniform buffers.
HGIGL_API void InsertFunctionOp(std::function< void(void)> const &fn)
XXX This function is exposed temporarily for Hgi transition.
HGIGL_API void Draw(uint32_t vertexCount, uint32_t firstVertex, uint32_t instanceCount) override
Records a draw command that renders one or more instances of primitives using the number of vertices ...
HGIGL_API void DrawIndexedIndirect(HgiBufferHandle const &indexBuffer, HgiBufferHandle const &drawParameterBuffer, uint32_t drawBufferOffset, uint32_t drawCount, uint32_t stride) override
Records a indexed multi-draw command that reads the draw parameters from a provided drawParameterBuff...
HGIGL_API void SetScissor(GfVec4i const &sc) override
Only pixels that lie within the scissor box are modified by drawing commands.
OpenGL implementation of HgiGraphicsCmds.
HGIGL_API void DrawIndexed(HgiBufferHandle const &indexBuffer, uint32_t indexCount, uint32_t indexBufferByteOffset, uint32_t vertexOffset, uint32_t instanceCount) override
Records a draw command that renders one or more instances of primitives using an indexBuffer starting...
OpenGL implementation of the Hydra Graphics Interface.
HGIGL_API void PushDebugGroup(const char *label) override
Push a debug marker.
HGIGL_API void BindVertexBuffers(uint32_t firstBinding, HgiBufferHandleVector const &buffers, std::vector< uint32_t > const &byteOffsets) override
Binds the vertex buffer(s) that describe the vertex attributes.
HGIGL_API void BindPipeline(HgiGraphicsPipelineHandle pipeline) override
Bind a pipeline state object.
Describes the properties to begin a HgiGraphicsCmds.
Hydra Graphics Interface.
HGIGL_API void PopDebugGroup() override
Pop the last debug marker.
HGIGL_API void SetViewport(GfVec4i const &vp) override
Set viewport [left, BOTTOM, width, height] - OpenGL coords.