HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdxEffectsShader Class Referenceabstract

#include <effectsShader.h>

+ Inheritance diagram for HdxEffectsShader:

Public Member Functions

virtual HDX_API ~HdxEffectsShader ()
 

Static Public Member Functions

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

Protected Member Functions

 HdxEffectsShader ()=delete
 
 HdxEffectsShader (const HdxEffectsShader &)=delete
 
HdxEffectsShaderoperator= (const HdxEffectsShader &)=delete
 
HDX_API HdxEffectsShader (Hgi *hgi, const std::string &debugName)
 
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

virtual HDX_API HdxEffectsShader::~HdxEffectsShader ( )
virtual
HdxEffectsShader::HdxEffectsShader ( )
protecteddelete
HdxEffectsShader::HdxEffectsShader ( const HdxEffectsShader )
protecteddelete
HDX_API HdxEffectsShader::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.

Member Function Documentation

HDX_API void HdxEffectsShader::_CreateAndSubmitGraphicsCmds ( const HgiTextureHandleVector colorTextures,
const HgiTextureHandleVector colorResolveTextures,
const HgiTextureHandle depthTexture,
const HgiTextureHandle depthResolveTexture,
const GfVec4i viewport 
)
protected
HDX_API void HdxEffectsShader::_DestroyShaderProgram ( HgiShaderProgramHandle shaderProgram)
protected
HDX_API void HdxEffectsShader::_DrawIndexed ( const HgiBufferHandle vertexBuffer,
const HgiBufferHandle indexBuffer,
uint32_t  indexCount,
uint32_t  indexBufferByteOffset,
uint32_t  baseVertex,
uint32_t  instanceCount,
uint32_t  baseInstance 
)
protected
HDX_API void HdxEffectsShader::_DrawNonIndexed ( const HgiBufferHandle vertexBuffer,
uint32_t  vertexCount,
uint32_t  baseVertex,
uint32_t  instanceCount,
uint32_t  baseInstance 
)
protected
HDX_API const std::string& HdxEffectsShader::_GetDebugName ( ) const
protected
HDX_API Hgi* HdxEffectsShader::_GetHgi ( ) const
protected
virtual HDX_API void HdxEffectsShader::_RecordDrawCmds ( )
protectedpure virtual
HDX_API void HdxEffectsShader::_SetBufferBindings ( const HgiBufferBindDescVector buffers)
protected
HDX_API void HdxEffectsShader::_SetColorAttachments ( const HgiAttachmentDescVector colorAttachmentDescs)
protected
HDX_API void HdxEffectsShader::_SetDepthAttachment ( const HgiAttachmentDesc depthAttachmentDesc)
protected
HDX_API void HdxEffectsShader::_SetDepthStencilState ( const HgiDepthStencilState depthStencilState)
protected
HDX_API void HdxEffectsShader::_SetMultiSampleState ( const HgiMultiSampleState multiSampleState)
protected
HDX_API void HdxEffectsShader::_SetPrimitiveType ( HgiPrimitiveType  primitiveType)
protected
HDX_API void HdxEffectsShader::_SetRasterizationState ( const HgiRasterizationState rasterizationState)
protected
HDX_API void HdxEffectsShader::_SetShaderConstants ( uint32_t  byteSize,
const void data,
HgiShaderStage  stageUsage 
)
protected
HDX_API void HdxEffectsShader::_SetShaderProgram ( const HgiShaderProgramHandle shaderProgram)
protected
HDX_API void HdxEffectsShader::_SetTextureBindings ( const HgiTextureBindDescVector textures)
protected
HDX_API void HdxEffectsShader::_SetVertexBufferDescs ( const HgiVertexBufferDescVector vertexBufferDescs)
protected
HdxEffectsShader& HdxEffectsShader::operator= ( const HdxEffectsShader )
protecteddelete
static void HdxEffectsShader::PrintCompileErrors ( const HgiShaderFunctionHandle shaderFn)
static
static void HdxEffectsShader::PrintCompileErrors ( const HgiShaderProgramHandle shaderProgram)
static

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