Loading...
Searching...
No Matches
imageShaderRenderPass.h
1//
2// Copyright 2019 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_ST_IMAGE_SHADER_RENDER_PASS_H
8#define PXR_IMAGING_HD_ST_IMAGE_SHADER_RENDER_PASS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdSt/api.h"
12#include "pxr/imaging/hdSt/drawItemInstance.h"
13#include "pxr/imaging/hd/renderPass.h"
14
15#include <memory>
16
17PXR_NAMESPACE_OPEN_SCOPE
18
19using HdStResourceRegistrySharedPtr =
20 std::shared_ptr<class HdStResourceRegistry>;
21
22using HdSt_ImageShaderRenderPassSharedPtr =
23 std::shared_ptr<class HdSt_ImageShaderRenderPass>;
24using HdStResourceRegistrySharedPtr =
25 std::shared_ptr<class HdStResourceRegistry>;
26
27class Hgi;
28
37class HdSt_ImageShaderRenderPass final : public HdRenderPass {
38public:
39 HDST_API
40 HdSt_ImageShaderRenderPass(HdRenderIndex *index,
41 HdRprimCollection const &collection);
42
43 HDST_API
44 virtual ~HdSt_ImageShaderRenderPass();
45
46 // Set the vertex BAR and geometric shader for the triangle.
47 // This function should be called before the Execute task phase.
48 HDST_API
49 void SetupFullscreenTriangleDrawItem();
50protected:
51
52 void _Execute(HdRenderPassStateSharedPtr const &renderPassState,
53 TfTokenVector const &renderTags) override;
54
55private:
56 // Setup a BAR for a single triangle
57 void _SetupVertexPrimvarBAR(HdStResourceRegistrySharedPtr const&);
58
59 // We re-use the immediateBatch to draw the full-screen triangle.
60 HdRprimSharedData _sharedData;
61 HdStDrawItem _drawItem;
62 HdStDrawItemInstance _drawItemInstance;
63 HdSt_DrawBatchSharedPtr _drawBatch;
64 Hgi* _hgi;
65};
66
67PXR_NAMESPACE_CLOSE_SCOPE
68
69#endif
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:105
An abstract class representing a single render iteration over a set of prims (the HdRprimCollection),...
Definition: renderPass.h:53
virtual void _Execute(HdRenderPassStateSharedPtr const &renderPassState, TfTokenVector const &renderTags)=0
Virtual API: Execute the buckets corresponding to renderTags; renderTags.empty() implies execute ever...
A named, semantic collection of objects.
A container to store instance state for a drawitem.
Hydra Graphics Interface.
Definition: hgi.h:95
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440