[Mesa-dev] [PATCH] glapi: define GL_API to be GLAPI in glapi_dispatch.c

Charmaine Lee charmainel at vmware.com
Fri Mar 30 16:23:36 UTC 2018


Reviewed-by: Charmaine Lee <charmainel at vmware.com>

________________________________________
From: Brian Paul <brianp at vmware.com>
Sent: Friday, March 30, 2018 7:42 AM
To: mesa-dev at lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende
Subject: [PATCH] glapi: define GL_API to be GLAPI in glapi_dispatch.c

This fixes a Windows build warning where the prototypes for the ES
function in the header file don't match the prototypes in this file
because the GL_API and GLAPI macros are defined differently.
---
 src/mapi/glapi/glapi_dispatch.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mapi/glapi/glapi_dispatch.c b/src/mapi/glapi/glapi_dispatch.c
index 3239523..f0a8c36 100644
--- a/src/mapi/glapi/glapi_dispatch.c
+++ b/src/mapi/glapi/glapi_dispatch.c
@@ -97,6 +97,11 @@
  */
 #include <GLES/glplatform.h>

+
+/* Use the GLAPI annotation from GL/gl.h, not GL_API from GLES/gl.h */
+#undef GL_API
+#define GL_API GLAPI
+
 GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
 GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
 GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
--
2.7.4



More information about the mesa-dev mailing list