Re: [Mesa-dev] [PATCH] glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2)

2018-04-03 Thread Emil Velikov
On 30 March 2018 at 19:52, 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.
>
> v2: defined GL_API to KEYWORD1 instead of GLAPI, per Mathias.
> ---
>  src/mapi/glapi/glapi_dispatch.c | 7 +++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/mapi/glapi/glapi_dispatch.c b/src/mapi/glapi/glapi_dispatch.c
> index 3239523..ca15449 100644
> --- a/src/mapi/glapi/glapi_dispatch.c
> +++ b/src/mapi/glapi/glapi_dispatch.c
> @@ -97,6 +97,13 @@
>   */
>  #include 
>
> +
> +/* Redefine GL_API to avoid MSVC/MinGW warnings about different dllimport
> + * attributes for these prototypes vs those in the GLES/gl.h header.
> + */
> +#undef GL_API
> +#define GL_API KEYWORD1
> +

I realise that the patch has landed, just sharing an idea:

es1_conversion.h has analogous workaround.
In the long term we'd want to get the close-but-not-identical GL <>
GLES (KHR really) macros.

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


Re: [Mesa-dev] [PATCH] glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2)

2018-03-30 Thread Mathias Fröhlich
Hi Brian,

Thanks!

Reviewed-by: Mathias Fröhlich 

best 

Mathias

On Friday, 30 March 2018 20:52:58 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.
> 
> v2: defined GL_API to KEYWORD1 instead of GLAPI, per Mathias.
> ---
>  src/mapi/glapi/glapi_dispatch.c | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/mapi/glapi/glapi_dispatch.c b/src/mapi/glapi/
glapi_dispatch.c
> index 3239523..ca15449 100644
> --- a/src/mapi/glapi/glapi_dispatch.c
> +++ b/src/mapi/glapi/glapi_dispatch.c
> @@ -97,6 +97,13 @@
>   */
>  #include 
>  
> +
> +/* Redefine GL_API to avoid MSVC/MinGW warnings about different dllimport
> + * attributes for these prototypes vs those in the GLES/gl.h header.
> + */
> +#undef GL_API
> +#define GL_API KEYWORD1
> +
>  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);
> 




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


[Mesa-dev] [PATCH] glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2)

2018-03-30 Thread Brian Paul
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.

v2: defined GL_API to KEYWORD1 instead of GLAPI, per Mathias.
---
 src/mapi/glapi/glapi_dispatch.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/mapi/glapi/glapi_dispatch.c b/src/mapi/glapi/glapi_dispatch.c
index 3239523..ca15449 100644
--- a/src/mapi/glapi/glapi_dispatch.c
+++ b/src/mapi/glapi/glapi_dispatch.c
@@ -97,6 +97,13 @@
  */
 #include 
 
+
+/* Redefine GL_API to avoid MSVC/MinGW warnings about different dllimport
+ * attributes for these prototypes vs those in the GLES/gl.h header.
+ */
+#undef GL_API
+#define GL_API KEYWORD1
+
 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

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