diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-02 18:22:22 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-02 18:22:22 +0000 |
| commit | 111636445d2e19420468cdf78ffd2b87b7ad6489 (patch) | |
| tree | adb5457b4f0cd56a323c99f1cedc5a2fce0667ee /Graphics/GraphicsEngineOpenGL | |
| parent | Added explicit state transition control to UpdateBuffer and UpdateTexture com... (diff) | |
| download | DiligentCore-111636445d2e19420468cdf78ffd2b87b7ad6489.tar.gz DiligentCore-111636445d2e19420468cdf78ffd2b87b7ad6489.zip | |
Brought back MapType paramter to UnmapBuffer() function. The performance hit of keeping track of mapped buffers turned out to be unacceptable
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h index 3cd10b90..325b5ab6 100644 --- a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h @@ -88,7 +88,7 @@ public: virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData)override final; - virtual void UnmapBuffer(IBuffer* pBuffer)override final; + virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType)override final; virtual void UpdateTexture(ITexture* pTexture, Uint32 MipLevel, diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp index f4e61e6f..4f5b56b2 100644 --- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp @@ -1039,9 +1039,9 @@ namespace Diligent pBufferGL->Map(m_ContextState, MapType, MapFlags, pMappedData); } - void DeviceContextGLImpl::UnmapBuffer(IBuffer* pBuffer) + void DeviceContextGLImpl::UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) { - TDeviceContextBase::UnmapBuffer(pBuffer); + TDeviceContextBase::UnmapBuffer(pBuffer, MapType); auto* pBufferGL = ValidatedCast<BufferGLImpl>(pBuffer); pBufferGL->Unmap(); } |
