On 03/30/2018 09:39 AM, Mathias Fröhlich wrote:

On Friday, 30 March 2018 16:42:43 CEST Brian Paul wrote:
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
+


Hi Brian,

I wonder if this proposed change introduces some similar warning on some non
windows builds.

It looks like down in the generated glapitemp.h included down the file, the
functions get implemented like

KEYWORD1 <returntype> KEYWORD2 glSomething(...);

So, may be you want to define:

#define GL_API KEYWORD1

to match the prototypes with the implementation?

That works too.  I'll post a v2.

-Brian


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to