mesa/include/GL
Julien Isorce c7f3657450 darwin: Suppress type conversion warnings for GLhandleARB
This patch and its description are inspired from Jose Fonseca
explanations and suggestions.

With this patch the following logic applies and only if __APPLE__:

When building mesa, GLhandleARB is defined as unsigned long and
at some point casted to GLuint in gl fuction implementations.
These exact points are where these errors and warnings appear.

When building an application GLhandleARB is defined as void*.
Later when calling a gl function, for example glBindAttribLocationARB,
it will be dispatched to _mesa_BindAttribLocation. So internally
void* will be treated as unsigned long which has the same size.
So the same truncation happens when casting it to GLuint.

Same when GLhandleARB appears as return value.
For mesa it will be GLuint -> unsigned long.
For an application it will be GLuint -> unsigned long -> void*.
Note that the value will be preserved when casting back to GLuint.

When GLhandleARB appears as a pointer there are also separate
entry-points, i.e. _mesa_FuncNameARB. So the same logic can
be applied.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66346
Signed-off-by: Julien Isorce <julien.isorce@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-08 13:18:42 +01:00
..
internal dri_interface: add an interface for fences 2015-04-30 14:38:38 +02:00
gl.h mesa: remove unused #pragma export on/off lines 2014-04-28 17:16:42 -06:00
gl_mangle.h mesa: regenerate gl_mangle.h 2014-08-12 08:09:45 -06:00
glcorearb.h mesa: pull Khronos glcorearb.h header into include/GL/ 2014-08-12 15:55:41 -06:00
glext.h darwin: Suppress type conversion warnings for GLhandleARB 2015-07-08 13:18:42 +01:00
glx.h glxext: Send the Drawable's ID in the GLX_BufferSwapComplete event 2014-06-27 09:44:56 +10:00
glx_mangle.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
glxext.h mesa: update glxext.h to version 20140810 2014-08-12 08:09:45 -06:00
osmesa.h configure: nuke --with-max-{width,height} 2015-04-01 19:43:34 +00:00
wglext.h mesa: update wglext.h to version 20140810 2014-08-12 08:09:45 -06:00