HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStDrawTarget Class Reference

#include <drawTarget.h>

+ Inheritance diagram for HdStDrawTarget:

Public Types

enum  DirtyBits : HdDirtyBits {
  Clean = 0, DirtyDTEnable = 1 << 0, DirtyDTCamera = 1 << 1, DirtyDTResolution = 1 << 2,
  DirtyDTAttachment = 1 << 3, DirtyDTAovBindings = 1 << 4, DirtyDTDepthClearValue = 1 << 5, DirtyDTDepthPriority = 1 << 6,
  DirtyDTCollection = 1 << 7, AllDirty
}
 

Public Member Functions

HDST_API HdStDrawTarget (SdfPath const &id)
 
HDST_API ~HdStDrawTarget () override
 
unsigned int GetVersion () const
 
HDST_API void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
 Synchronizes state from the delegate to this object. More...
 
HDST_API HdDirtyBits GetInitialDirtyBitsMask () const override
 
- Public Member Functions inherited from HdSprim
HD_API HdSprim (SdfPath const &id)
 
virtual HD_API ~HdSprim ()
 
SdfPath constGetId () const
 
virtual HD_API void Finalize (HdRenderParam *renderParam)
 

Static Public Member Functions

static HDST_API bool GetUseStormTextureSystem ()
 

Draw Target API

bool IsEnabled () const
 The context which owns the draw target object. More...
 
const GlfDrawTargetRefPtr & GetGlfDrawTarget () const
 The context which owns the draw target object. More...
 
const
HdStDrawTargetRenderPassState
GetRenderPassState () const
 The context which owns the draw target object. More...
 
HDST_API HdRprimCollection constGetCollection () const
 Returns collection of rprims the draw target draws. More...
 
HDST_API bool WriteToFile (const HdRenderIndex &renderIndex, const std::string &attachment, const std::string &path) const
 Debug api to output the contents of the draw target to a png file. More...
 
const GfVec2iGetResolution () const
 
static HDST_API void GetDrawTargets (HdRenderIndex *renderIndex, HdStDrawTargetPtrVector *drawTargets)
 returns all HdStDrawTargets in the render index More...
 

Detailed Description

Represents an render to texture render pass.

Note
This is a temporary API to aid transition to Storm, and is subject to major changes.

Definition at line 74 of file drawTarget.h.

Member Enumeration Documentation

Dirty bits for the HdStDrawTarget object

When GetUseStormTextureSystem() is true, "Legacy" dirty bits are ignored.

Enumerator
Clean 
DirtyDTEnable 
DirtyDTCamera 
DirtyDTResolution 
DirtyDTAttachment 
DirtyDTAovBindings 
DirtyDTDepthClearValue 
DirtyDTDepthPriority 
DirtyDTCollection 
AllDirty 

Definition at line 87 of file drawTarget.h.

Constructor & Destructor Documentation

HDST_API HdStDrawTarget::HdStDrawTarget ( SdfPath const id)
HDST_API HdStDrawTarget::~HdStDrawTarget ( )
override

Member Function Documentation

HDST_API HdRprimCollection const& HdStDrawTarget::GetCollection ( ) const
inline

Returns collection of rprims the draw target draws.

Definition at line 154 of file drawTarget.h.

static HDST_API void HdStDrawTarget::GetDrawTargets ( HdRenderIndex renderIndex,
HdStDrawTargetPtrVector drawTargets 
)
static

returns all HdStDrawTargets in the render index

const GlfDrawTargetRefPtr& HdStDrawTarget::GetGlfDrawTarget ( ) const
inline

The context which owns the draw target object.

Definition at line 146 of file drawTarget.h.

HDST_API HdDirtyBits HdStDrawTarget::GetInitialDirtyBitsMask ( ) const
overridevirtual

Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim. Typically this would be all dirty bits.

Implements HdSprim.

const HdStDrawTargetRenderPassState* HdStDrawTarget::GetRenderPassState ( ) const
inline

The context which owns the draw target object.

Definition at line 147 of file drawTarget.h.

const GfVec2i& HdStDrawTarget::GetResolution ( ) const
inline

Resolution.

Set during sync.

Definition at line 171 of file drawTarget.h.

static HDST_API bool HdStDrawTarget::GetUseStormTextureSystem ( )
static

If true, the draw target attachments are managed by the Storm texture system. This also makes the draw target task use HgiGraphicsCmdDesc to bind the attachments as render targets. Shaders who want to read the attachments can bind the textures like any other texture in the Storm texture system. Note: draw targets managed by the Storm texture system do not work when bindless textures are enabled.

If false, uses GlfDrawTarget.

unsigned int HdStDrawTarget::GetVersion ( ) const
inline

Returns the version of the under-lying GlfDrawTarget. The version changes if the draw target attachments texture ids are changed in anyway (for example switching to a new GlfDrawTarget object or resize the resources). The version does not increment if only the contents of the texture resources change

Definition at line 127 of file drawTarget.h.

bool HdStDrawTarget::IsEnabled ( ) const
inline

The context which owns the draw target object.

Definition at line 145 of file drawTarget.h.

HDST_API void HdStDrawTarget::Sync ( HdSceneDelegate sceneDelegate,
HdRenderParam renderParam,
HdDirtyBits dirtyBits 
)
overridevirtual

Synchronizes state from the delegate to this object.

Implements HdSprim.

HDST_API bool HdStDrawTarget::WriteToFile ( const HdRenderIndex renderIndex,
const std::string attachment,
const std::string path 
) const

Debug api to output the contents of the draw target to a png file.


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