diff options
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; |
