diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-10-19 19:08:40 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-10-19 19:08:40 +0000 |
| commit | e5f36378de4a7258fcc9d6ca7a349df1136b7444 (patch) | |
| tree | 2470fdcc8e1ed3d029ce30f6ac8d63e6fba4f005 /Graphics/GraphicsEngineOpenGL | |
| parent | Renamed static sampler to immutable sampler (API240076) (diff) | |
| download | DiligentCore-e5f36378de4a7258fcc9d6ca7a349df1136b7444.tar.gz DiligentCore-e5f36378de4a7258fcc9d6ca7a349df1136b7444.zip | |
Renamed USAGE_STATIC to USAGE_IMMUTABLE (API240077)
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp | 4 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp b/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp index a93528ec..4c57652f 100644 --- a/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp @@ -82,7 +82,7 @@ inline GLenum UsageToGLUsage(const BufferDesc& Desc) // DYNAMIC: The data store contents will be modified repeatedly and used many times. // clang-format off - case USAGE_STATIC: return GL_STATIC_DRAW; + case USAGE_IMMUTABLE: return GL_STATIC_DRAW; case USAGE_DEFAULT: return GL_STATIC_DRAW; case USAGE_UNIFIED: return GL_STATIC_DRAW; case USAGE_DYNAMIC: return GL_DYNAMIC_DRAW; diff --git a/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp index 4bba7d46..ac99cfa0 100644 --- a/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp @@ -96,8 +96,8 @@ BufferGLImpl::BufferGLImpl(IReferenceCounters* pRefCounters, LOG_ERROR_AND_THROW("Unified resources are not supported in OpenGL/GLES"); } - if (m_Desc.Usage == USAGE_STATIC) - VERIFY(pBuffData != nullptr && pBuffData->pData != nullptr, "Initial data must not be null for static buffers"); + if (m_Desc.Usage == USAGE_IMMUTABLE) + VERIFY(pBuffData != nullptr && pBuffData->pData != nullptr, "Initial data must not be null for immutable buffers"); // TODO: find out if it affects performance if the buffer is originally bound to one target // and then bound to another (such as first to GL_ARRAY_BUFFER and then to GL_UNIFORM_BUFFER) diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp index 564d16cb..243ab1c9 100644 --- a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp @@ -63,8 +63,8 @@ TextureBaseGL::TextureBaseGL(IReferenceCounters* pRefCounters, // clang-format on { VERIFY(m_GLTexFormat != 0, "Unsupported texture format"); - if (TexDesc.Usage == USAGE_STATIC && pInitData == nullptr) - LOG_ERROR_AND_THROW("Static Texture must be initialized with data at creation time"); + if (TexDesc.Usage == USAGE_IMMUTABLE && pInitData == nullptr) + LOG_ERROR_AND_THROW("Immutable textures must be initialized with data at creation time"); if (TexDesc.Usage == USAGE_STAGING) { |
