summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-03-27 06:20:54 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-03-27 06:20:54 +0000
commit3aaa8e2dcb73ca91a488f21250aceb0267fb15d6 (patch)
tree204c502be3dacaab1cae2fb40bdcf2845e037ea9 /Graphics/GraphicsEngineOpenGL
parentAdded functions for Ortho projection matrix (diff)
downloadDiligentCore-3aaa8e2dcb73ca91a488f21250aceb0267fb15d6.tar.gz
DiligentCore-3aaa8e2dcb73ca91a488f21250aceb0267fb15d6.zip
Reworked debug message handling to allow user-specified callbacks
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp7
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp7
2 files changed, 14 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp
index 390b99cd..ff2d46de 100644
--- a/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp
@@ -52,7 +52,14 @@ static GLenum GetBufferBindTarget(const BufferDesc& Desc)
Target = GL_UNIFORM_BUFFER;
else if(Desc.BindFlags & BIND_INDIRECT_DRAW_ARGS)
{
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable : 4127) // conditional expression is constant
+#endif
VERIFY(GL_DRAW_INDIRECT_BUFFER != 0, "Inidrect draw is not supported");
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
Target = GL_DRAW_INDIRECT_BUFFER;
}
else if (Desc.Usage == USAGE_CPU_ACCESSIBLE && Desc.CPUAccessFlags == CPU_ACCESS_WRITE)
diff --git a/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp
index 46653e2a..46ee6ca2 100644
--- a/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp
@@ -42,7 +42,14 @@ namespace Diligent
{
if( ViewDesc.ViewType == BUFFER_VIEW_SHADER_RESOURCE && pBuffer->GetDesc().Mode == BUFFER_MODE_FORMATTED )
{
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable : 4127) // conditional expression is constant
+#endif
VERIFY( GL_TEXTURE_BUFFER != 0, "GL texture buffers are not supported");
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
auto *pContextGL = ValidatedCast<DeviceContextGLImpl>(pContext);
auto &ContextState = pContextGL->GetContextState();