diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-09-01 19:02:31 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-09-01 19:02:31 +0000 |
| commit | 590c98bfe02f1758f3828b8e3cc813c0dbee654e (patch) | |
| tree | e5072aad7d2944a6b03aa1141b1a5ced90975959 /Graphics/GraphicsEngineOpenGL | |
| parent | Disabled notification messages in OpenGL (diff) | |
| download | DiligentCore-590c98bfe02f1758f3828b8e3cc813c0dbee654e.tar.gz DiligentCore-590c98bfe02f1758f3828b8e3cc813c0dbee654e.zip | |
Updated texture map/unmap intererface; implemented texture mapping in D3D12
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h | 10 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp | 15 |
2 files changed, 19 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h index 1af707a0..4f80aa05 100644 --- a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h +++ b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h @@ -67,8 +67,14 @@ public: virtual void UpdateData( class GLContextState &CtxState, IDeviceContext *pContext, Uint32 MipLevel, Uint32 Slice, const Box &DstBox, const TextureSubResData &SubresData ); //virtual void CopyData(CTexture *pSrcTexture, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size); - virtual void Map( IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData )override; - virtual void Unmap( IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags )override; + virtual void Map(IDeviceContext* pContext, + Uint32 MipLevel, + Uint32 ArraySlice, + MAP_TYPE MapType, + Uint32 MapFlags, + const Box* pMapRegion, + MappedTextureSubresource& MappedData)override; + virtual void Unmap(IDeviceContext *pContext, Uint32 MipLevel, Uint32 ArraySlice)override; const GLObjectWrappers::GLTextureObj& GetGLHandle()const{ return m_GlTexture; } virtual GLenum GetBindTarget()const override final{return m_BindTarget;} diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp index f5e6034b..a0f0820b 100644 --- a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp @@ -494,15 +494,22 @@ void TextureBaseGL :: CopyData(IDeviceContext *pContext, } -void TextureBaseGL :: Map(IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData) +void TextureBaseGL :: Map(IDeviceContext* pContext, + Uint32 MipLevel, + Uint32 ArraySlice, + MAP_TYPE MapType, + Uint32 MapFlags, + const Box* pMapRegion, + MappedTextureSubresource& MappedData) { - TTextureBase::Map( pContext, Subresource, MapType, MapFlags, MappedData ); + TTextureBase::Map(pContext, MipLevel, ArraySlice, MapType, MapFlags, pMapRegion, MappedData); LOG_ERROR_MESSAGE("Texture mapping is not supported in OpenGL"); + MappedData = MappedTextureSubresource{}; } -void TextureBaseGL::Unmap( IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags ) +void TextureBaseGL::Unmap(IDeviceContext* pContext, Uint32 MipLevel, Uint32 ArraySlice) { - TTextureBase::Unmap(pContext, Subresource, MapType, MapFlags); + TTextureBase::Unmap(pContext, MipLevel, ArraySlice); LOG_ERROR_MESSAGE("Texture mapping is not supported in OpenGL"); } |
