summaryrefslogtreecommitdiff
path: root/tools/gfx/renderer-shared.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-04-05 13:31:05 -0700
committerGitHub <noreply@github.com>2021-04-05 13:31:05 -0700
commit086ecf41fa21138899960bb9805bc8ced91690f0 (patch)
treec98af81ffc28371a9334e71987a85f9e88bce678 /tools/gfx/renderer-shared.h
parentdd662f5cda97e7a6720ef526509a772a06112d4a (diff)
Transient root shader object. (#1782)
Diffstat (limited to 'tools/gfx/renderer-shared.h')
-rw-r--r--tools/gfx/renderer-shared.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h
index d1ecebfce..79c965631 100644
--- a/tools/gfx/renderer-shared.h
+++ b/tools/gfx/renderer-shared.h
@@ -271,6 +271,10 @@ public:
// pipeline cannot be used directly and must be specialized first.
bool isSpecializable = false;
ComPtr<IShaderProgram> m_program;
+ template <typename TProgram> TProgram* getProgram()
+ {
+ return static_cast<TProgram*>(m_program.get());
+ }
protected:
void initializeBase(const PipelineStateDesc& inDesc);