Loading...
Searching...
No Matches
HdxEffectsShader Class Referenceabstract

This class provides functionality to create and manage a single HgiGraphicsPipeline instance and to issue draw calls to that instance. More...

#include <effectsShader.h>

+ Inheritance diagram for HdxEffectsShader:

Static Public Member Functions

static void PrintCompileErrors (const HgiShaderFunctionHandle &shaderFn)
 
static void PrintCompileErrors (const HgiShaderProgramHandle &shaderProgram)
 

Protected Member Functions

 HdxEffectsShader (const HdxEffectsShader &)=delete
 
HdxEffectsShaderoperator= (const HdxEffectsShader &)=delete
 
HDX_API HdxEffectsShader (Hgi *hgi, const std::string &debugName)
 Create a new shader object.
 
HDX_API void _SetColorAttachments (const HgiAttachmentDescVector &colorAttachmentDescs)
 
HDX_API void _SetDepthAttachment (const HgiAttachmentDesc &depthAttachmentDesc)
 
HDX_API void _SetPrimitiveType (HgiPrimitiveType primitiveType)
 
HDX_API void _SetShaderProgram (const HgiShaderProgramHandle &shaderProgram)
 
HDX_API void _SetVertexBufferDescs (const HgiVertexBufferDescVector &vertexBufferDescs)
 
HDX_API void _SetDepthStencilState (const HgiDepthStencilState &depthStencilState)
 
HDX_API void _SetMultiSampleState (const HgiMultiSampleState &multiSampleState)
 
HDX_API void _SetRasterizationState (const HgiRasterizationState &rasterizationState)
 
HDX_API void _SetShaderConstants (uint32_t byteSize, const void *data, HgiShaderStage stageUsage)
 
HDX_API void _SetTextureBindings (const HgiTextureBindDescVector &textures)
 
HDX_API void _SetBufferBindings (const HgiBufferBindDescVector &buffers)
 
HDX_API void _CreateAndSubmitGraphicsCmds (const HgiTextureHandleVector &colorTextures, const HgiTextureHandleVector &colorResolveTextures, const HgiTextureHandle &depthTexture, const HgiTextureHandle &depthResolveTexture, const GfVec4i &viewport)
 
virtual HDX_API void _RecordDrawCmds ()=0
 
HDX_API void _DrawNonIndexed (const HgiBufferHandle &vertexBuffer, uint32_t vertexCount, uint32_t baseVertex, uint32_t instanceCount, uint32_t baseInstance)
 
HDX_API void _DrawIndexed (const HgiBufferHandle &vertexBuffer, const HgiBufferHandle &indexBuffer, uint32_t indexCount, uint32_t indexBufferByteOffset, uint32_t baseVertex, uint32_t instanceCount, uint32_t baseInstance)
 
HDX_API Hgi_GetHgi () const
 
HDX_API void _DestroyShaderProgram (HgiShaderProgramHandle *shaderProgram)
 
HDX_API const std::string & _GetDebugName () const
 

Detailed Description

This class provides functionality to create and manage a single HgiGraphicsPipeline instance and to issue draw calls to that instance.

Sub-classes should define the actual interface for issuing the draw call leveraging the common functionality this class provides to facilitate that.

It is primarily intended to be used for full screen passes that perform a sceen-space effect. As an example, the HdxFullscreenShader class inherits from this class and makes use of the functions defined here to set up its pipeline and issue draw commands.

Definition at line 61 of file effectsShader.h.

Constructor & Destructor Documentation

◆ HdxEffectsShader()

HDX_API HdxEffectsShader ( Hgi hgi,
const std::string &  debugName 
)
protected

Create a new shader object.

Parameters
hgiHgi instance to use to create any GPU resources.
debugNameName used to tag GPU resources to aid in debugging.

The documentation for this class was generated from the following file: