summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-09-16 04:59:00 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-09-16 04:59:00 +0000
commitb6bea2afeba858f2d48f9f992ef43868c08a3122 (patch)
treed65d303c43395e63eaac5c4e9c61cebfc0d79460 /Graphics/GraphicsEngineOpenGL
parentFixed Android build (diff)
downloadDiligentCore-b6bea2afeba858f2d48f9f992ef43868c08a3122.tar.gz
DiligentCore-b6bea2afeba858f2d48f9f992ef43868c08a3122.zip
Fixed Win32 build
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/GLStubsIOS.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp16
3 files changed, 16 insertions, 8 deletions
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<const int*>(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,