From 3aaa8e2dcb73ca91a488f21250aceb0267fb15d6 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 26 Mar 2018 23:20:54 -0700 Subject: Reworked debug message handling to allow user-specified callbacks --- Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp | 7 +++++++ Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'Graphics/GraphicsEngineOpenGL') 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(pContext); auto &ContextState = pContextGL->GetContextState(); -- cgit v1.2.3