7#ifndef PXR_IMAGING_HGI_GL_GRAPHICS_CMDS_H
8#define PXR_IMAGING_HGI_GL_GRAPHICS_CMDS_H
12#include "pxr/imaging/hgi/graphicsCmds.h"
13#include "pxr/imaging/hgiGL/api.h"
14#include "pxr/imaging/hgiGL/hgi.h"
17PXR_NAMESPACE_OPEN_SCOPE
42 const GfVec4f& color = s_graphicsDebugColor)
override;
50 const GfVec4f& color = s_markerDebugColor)
override;
67 HgiShaderStage stages,
70 const void* data)
override;
74 HgiVertexBufferBindingVector
const &bindings)
override;
80 uint32_t instanceCount,
81 uint32_t baseInstance)
override;
86 uint32_t drawBufferByteOffset,
88 uint32_t stride)
override;
94 uint32_t indexBufferByteOffset,
96 uint32_t instanceCount,
97 uint32_t baseInstance)
override;
103 uint32_t drawBufferByteOffset,
106 std::vector<uint32_t>
const& drawParameterBufferUInt32,
107 uint32_t patchBaseVertexByteOffset)
override;
121 bool _Submit(
Hgi* hgi, HgiSubmitWaitType wait)
override;
133 HgiPrimitiveType _primitiveType;
134 int _primitiveIndexSize;
137 int32_t _restoreReadFramebuffer;
138 int32_t _restoreDrawFramebuffer;
144PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 4 float components.
Basic type for a vector of 4 int components.
OpenGL implementation of GPU device.
OpenGL implementation of HgiGraphicsCmds.
HGIGL_API void SetScissor(GfVec4i const &sc) override
Only pixels that lie within the scissor box are modified by drawing commands.
HGIGL_API void PushDebugGroup(const char *label, const GfVec4f &color=s_graphicsDebugColor) override
Push a debug scope.
HGIGL_API void InsertMemoryBarrier(HgiMemoryBarrier barrier) override
Inserts a barrier so that data written to memory by commands before the barrier is available to comma...
HGIGL_API void BindVertexBuffers(HgiVertexBufferBindingVector const &bindings) override
Binds the vertex buffer(s) that describe the vertex attributes.
HGIGL_API void BindResources(HgiResourceBindingsHandle resources) override
Bind resources such as textures and uniform buffers.
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 DrawIndexedIndirect(HgiBufferHandle const &indexBuffer, HgiBufferHandle const &drawParameterBuffer, uint32_t drawBufferByteOffset, uint32_t drawCount, uint32_t stride, std::vector< uint32_t > const &drawParameterBufferUInt32, uint32_t patchBaseVertexByteOffset) override
Records a indexed multi-draw command that reads the draw parameters from a provided drawParameterBuff...
HGIGL_API void InsertDebugMarker(const char *label, const GfVec4f &color=s_markerDebugColor) override
Insert a debug marker.
HGIGL_API void SetViewport(GfVec4i const &vp) override
Set viewport [left, BOTTOM, width, height] - OpenGL coords.
HGIGL_API void InsertFunctionOp(std::function< void(void)> const &fn)
XXX This function is exposed temporarily for Hgi transition.
HGIGL_API void PopDebugGroup() override
Pop the last debug scope.
HGIGL_API void DrawIndexed(HgiBufferHandle const &indexBuffer, uint32_t indexCount, uint32_t indexBufferByteOffset, uint32_t baseVertex, uint32_t instanceCount, uint32_t baseInstance) override
Records a draw command that renders one or more instances of primitives using an indexBuffer starting...
HGIGL_API void BindPipeline(HgiGraphicsPipelineHandle pipeline) override
Bind a pipeline state object.
HGIGL_API void Draw(uint32_t vertexCount, uint32_t baseVertex, uint32_t instanceCount, uint32_t baseInstance) override
Records a draw command that renders one or more instances of primitives using the number of vertices ...
HGIGL_API void DrawIndirect(HgiBufferHandle const &drawParameterBuffer, uint32_t drawBufferByteOffset, uint32_t drawCount, uint32_t stride) override
Records a multi-draw command that reads the draw parameters from a provided drawParameterBuffer.
OpenGL implementation of the Hydra Graphics Interface.
A graphics API independent abstraction of graphics commands.
Hydra Graphics Interface.
Describes the properties to begin a HgiGraphicsCmds.