diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-01 18:34:20 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-01 18:34:20 +0000 |
| commit | 5257f98c5b0b43a887f7cd0528d343c831c053cb (patch) | |
| tree | 78adaa74c27323c17645a61252fd1301fef370db /Graphics/GraphicsEngine | |
| parent | Unified implementation of IPipelineState::BindShaderResources() (diff) | |
| download | DiligentCore-5257f98c5b0b43a887f7cd0528d343c831c053cb.tar.gz DiligentCore-5257f98c5b0b43a887f7cd0528d343c831c053cb.zip | |
Reworked how render targets are bound in Vulkan: added RenderPass cache
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/TextureViewBase.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/include/TextureViewBase.h b/Graphics/GraphicsEngine/include/TextureViewBase.h index 25c2c436..97256df2 100644 --- a/Graphics/GraphicsEngine/include/TextureViewBase.h +++ b/Graphics/GraphicsEngine/include/TextureViewBase.h @@ -97,6 +97,18 @@ public: return m_pTexture; } + template<typename TextureType> + TextureType* GetTexture() + { + return ValidatedCast<TextureType>(m_pTexture); + } + + template<typename TextureType> + TextureType* GetTexture()const + { + return ValidatedCast<TextureType>(m_pTexture); + } + protected: /// Strong reference to the sampler Diligent::RefCntAutoPtr<ISampler> m_pSampler; |
