HDK
|
#include <graphicsCmds.h>
Public Member Functions | |
HGIGL_API | ~HgiGLGraphicsCmds () override |
HGIGL_API void | InsertFunctionOp (std::function< void(void)> const &fn) |
HGIGL_API void | PushDebugGroup (const char *label) override |
Push a debug marker. More... | |
HGIGL_API void | PopDebugGroup () override |
Pop the last debug marker. More... | |
HGIGL_API void | SetViewport (GfVec4i const &vp) override |
Set viewport [left, BOTTOM, width, height] - OpenGL coords. More... | |
HGIGL_API void | SetScissor (GfVec4i const &sc) override |
HGIGL_API void | BindPipeline (HgiGraphicsPipelineHandle pipeline) override |
HGIGL_API void | BindResources (HgiResourceBindingsHandle resources) override |
HGIGL_API void | SetConstantValues (HgiGraphicsPipelineHandle pipeline, HgiShaderStage stages, uint32_t bindIndex, uint32_t byteSize, const void *data) override |
HGIGL_API void | BindVertexBuffers (uint32_t firstBinding, HgiBufferHandleVector const &buffers, std::vector< uint32_t > const &byteOffsets) override |
HGIGL_API void | DrawIndexed (HgiBufferHandle const &indexBuffer, uint32_t indexCount, uint32_t indexBufferByteOffset, uint32_t firstIndex, uint32_t vertexOffset, uint32_t instanceCount) override |
![]() | |
HGI_API | ~HgiGraphicsCmds () override |
![]() | |
virtual HGI_API | ~HgiCmds () |
Protected Member Functions | |
HGIGL_API | HgiGLGraphicsCmds (HgiGLDevice *device, HgiGraphicsCmdsDesc const &desc) |
HGIGL_API bool | _Submit (Hgi *hgi) override |
![]() | |
HGI_API | HgiGraphicsCmds () |
![]() | |
HGI_API | HgiCmds () |
Friends | |
class | HgiGL |
OpenGL implementation of HgiGraphicsCmds.
Definition at line 43 of file graphicsCmds.h.
|
override |
|
protected |
Reimplemented from HgiCmds.
|
overridevirtual |
Bind a pipeline state object. Usually you call this right after calling CreateGraphicsCmds to set the graphics pipeline state. The resource bindings used when creating the pipeline must be compatible with the resources bound via BindResources().
Implements HgiGraphicsCmds.
|
overridevirtual |
Bind resources such as textures and uniform buffers. Usually you call this right after BindPipeline() and the resources bound must be compatible with the bound pipeline.
Implements HgiGraphicsCmds.
|
overridevirtual |
Binds the vertex buffer(s) that describe the vertex attributes. firstBinding
the first index to which buffers are bound (usually 0). byteOffsets
offset to where the data of each buffer starts, in bytes. strides
the size of a vertex in each of the buffers.
Implements HgiGraphicsCmds.
|
overridevirtual |
Records a draw command that renders one or more instances of primitives using an indexBuffer starting from the base vertex of the base instance. indexCount
is the number of vertices. indexBufferByteOffset
: Byte offset within indexBuffer to start reading indices from. vertexOffset
: the value added to the vertex index before indexing into the vertex buffer (baseVertex). instanceCount
: number of instances (min 1) of the primitves to render.
Implements HgiGraphicsCmds.
XXX This function is exposed temporarily for Hgi transition. It allows code that is not yet converted to Hgi (e.g. HdSt) to insert its opengl calls into the ops-stack of HgiGL to ensure that all commands execute in the correct order. Once HdSt has transition fully to Hgi we should remove this function.
Pop the last debug marker.
Implements HgiGraphicsCmds.
Push a debug marker.
Implements HgiGraphicsCmds.
|
overridevirtual |
Set Push / Function constants. pipeline
is the pipeline that you are binding before the draw call. It contains the program used for the uniform buffer stages
describes for what shader stage you are setting the push constant values for. Each stage can have its own (or none) binding and they must match what is described in the shader functions. byteSize
is the size of the data you are updating. data
is the data you are copying into the push constants block.
Implements HgiGraphicsCmds.
Only pixels that lie within the scissor box are modified by drawing commands.
Implements HgiGraphicsCmds.
Set viewport [left, BOTTOM, width, height] - OpenGL coords.
Implements HgiGraphicsCmds.
Definition at line 99 of file graphicsCmds.h.