From b6bea2afeba858f2d48f9f992ef43868c08a3122 Mon Sep 17 00:00:00 2001 From: assiduous Date: Tue, 15 Sep 2020 21:59:00 -0700 Subject: Fixed Win32 build --- Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h | 4 ++++ Graphics/GraphicsEngineOpenGL/include/GLStubsIOS.h | 4 ++++ Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp | 16 ++++++++-------- 3 files changed, 16 insertions(+), 8 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h b/Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h index 3eaf32c5..cedc6e6c 100644 --- a/Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h +++ b/Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h @@ -27,6 +27,10 @@ // clang-format off +#ifndef GLAPIENTRY +# define GLAPIENTRY GL_APIENTRY +#endif + // Define unsupported formats for OpenGL ES #ifndef GL_RGBA16 # define GL_RGBA16 0x805B diff --git a/Graphics/GraphicsEngineOpenGL/include/GLStubsIOS.h b/Graphics/GraphicsEngineOpenGL/include/GLStubsIOS.h index 4e5ec188..74e94bc6 100644 --- a/Graphics/GraphicsEngineOpenGL/include/GLStubsIOS.h +++ b/Graphics/GraphicsEngineOpenGL/include/GLStubsIOS.h @@ -25,6 +25,10 @@ #include "Errors.hpp" +#ifndef GLAPIENTRY +# define GLAPIENTRY +#endif + #define glUseProgramStages glUseProgramStagesEXT #define glActiveShaderProgram glActiveShaderProgramEXT #define glCreateShaderProgramv glCreateShaderProgramvEXT diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp index 1d006454..31be44d1 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp @@ -55,13 +55,13 @@ namespace Diligent { #if GL_KHR_debug -static void openglCallbackFunction(GLenum source, - GLenum type, - GLuint id, - GLenum severity, - GLsizei length, - const GLchar* message, - const void* userParam) +static void GLAPIENTRY openglCallbackFunction(GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar* message, + const void* userParam) { auto* ShowDebugOutput = reinterpret_cast(userParam); if (*ShowDebugOutput == 0) @@ -122,7 +122,7 @@ static void openglCallbackFunction(GLenum source, LOG_INFO_MESSAGE(MessageSS.str().c_str()); } -#endif +#endif // GL_KHR_debug RenderDeviceGLImpl::RenderDeviceGLImpl(IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, -- cgit v1.2.3