diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-11-10 20:00:34 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-11-10 20:00:34 +0000 |
| commit | 99454f9aff426d652b4a166894b72d7b706f4287 (patch) | |
| tree | 6c588236cf41e15850ccd1e3a91535991ba86255 /Graphics/GraphicsEngine | |
| parent | Fixed release build error (diff) | |
| download | DiligentCore-99454f9aff426d652b4a166894b72d7b706f4287.tar.gz DiligentCore-99454f9aff426d652b4a166894b72d7b706f4287.zip | |
Implemented ResolveTextureSubresource in GL backend (fixed https://github.com/DiligentGraphics/DiligentCore/issues/108)
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/TextureBase.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Graphics/GraphicsEngine/include/TextureBase.h b/Graphics/GraphicsEngine/include/TextureBase.h index 81a02b92..063fc13e 100644 --- a/Graphics/GraphicsEngine/include/TextureBase.h +++ b/Graphics/GraphicsEngine/include/TextureBase.h @@ -175,6 +175,19 @@ public: return (this->m_State & State) == State; } + /// Implementation of ITexture::GetDefaultView(). + virtual ITextureView* GetDefaultView( TEXTURE_VIEW_TYPE ViewType )override + { + switch( ViewType ) + { + case TEXTURE_VIEW_SHADER_RESOURCE: return m_pDefaultSRV.get(); + case TEXTURE_VIEW_RENDER_TARGET: return m_pDefaultRTV.get(); + case TEXTURE_VIEW_DEPTH_STENCIL: return m_pDefaultDSV.get(); + case TEXTURE_VIEW_UNORDERED_ACCESS: return m_pDefaultUAV.get(); + default: UNEXPECTED( "Unknown view type" ); return nullptr; + } + } + protected: /// Pure virtual function that creates texture view for the specific engine implementation. @@ -193,19 +206,6 @@ protected: /// Default UAV addressing the entire texture std::unique_ptr<TTextureViewImpl, STDDeleter<TTextureViewImpl, TTexViewObjAllocator>> m_pDefaultUAV; - /// Implementation of ITexture::GetDefaultView(). - ITextureView* GetDefaultView( TEXTURE_VIEW_TYPE ViewType )override - { - switch( ViewType ) - { - case TEXTURE_VIEW_SHADER_RESOURCE: return m_pDefaultSRV.get(); - case TEXTURE_VIEW_RENDER_TARGET: return m_pDefaultRTV.get(); - case TEXTURE_VIEW_DEPTH_STENCIL: return m_pDefaultDSV.get(); - case TEXTURE_VIEW_UNORDERED_ACCESS: return m_pDefaultUAV.get(); - default: UNEXPECTED( "Unknown view type" ); return nullptr; - } - } - void CorrectTextureViewDesc( struct TextureViewDesc& ViewDesc ); RESOURCE_STATE m_State = RESOURCE_STATE_UNKNOWN; |
