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 +++++++ Graphics/GraphicsTools/src/TextureUploaderD3D11.cpp | 1 + Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp | 1 + Graphics/GraphicsTools/src/TextureUploaderGL.cpp | 1 + 5 files changed, 17 insertions(+) (limited to 'Graphics') 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(); diff --git a/Graphics/GraphicsTools/src/TextureUploaderD3D11.cpp b/Graphics/GraphicsTools/src/TextureUploaderD3D11.cpp index 25bb1e62..77fdd722 100644 --- a/Graphics/GraphicsTools/src/TextureUploaderD3D11.cpp +++ b/Graphics/GraphicsTools/src/TextureUploaderD3D11.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "TextureUploaderD3D11.h" diff --git a/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp b/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp index c5bfdb7b..98b3f40f 100644 --- a/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp +++ b/Graphics/GraphicsTools/src/TextureUploaderD3D12.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "TextureUploaderD3D12.h" diff --git a/Graphics/GraphicsTools/src/TextureUploaderGL.cpp b/Graphics/GraphicsTools/src/TextureUploaderGL.cpp index 8f5e863b..9dc02199 100644 --- a/Graphics/GraphicsTools/src/TextureUploaderGL.cpp +++ b/Graphics/GraphicsTools/src/TextureUploaderGL.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "TextureUploaderGL.h" namespace Diligent -- cgit v1.2.3