mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-26 08:31:56 +00:00
For GLEW Bug #227 - Use GLAPIENTRY for GLDEBUGPROC* and leave GLAPIENTRY for application code to use.
This commit is contained in:
parent
ab39de8d7e
commit
1aff81c823
@ -313,19 +313,19 @@ EOT
|
||||
# add typedef to GL_AMD_debug_output
|
||||
# parse_spec.pl can't parse typedefs from New Types section, but ought to
|
||||
cat >> $1/GL_AMD_debug_output <<EOT
|
||||
typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, void* userParam)
|
||||
typedef void (GLAPIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, void* userParam)
|
||||
EOT
|
||||
|
||||
# add typedef to GL_ARB_debug_output
|
||||
# parse_spec.pl can't parse typedefs from New Types section, but ought to
|
||||
cat >> $1/GL_ARB_debug_output <<EOT
|
||||
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
|
||||
typedef void (GLAPIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
|
||||
EOT
|
||||
|
||||
# add typedef to GL_KHR_debug
|
||||
# parse_spec.pl can't parse typedefs from New Types section, but ought to
|
||||
cat >> $1/GL_KHR_debug <<EOT
|
||||
typedef void (APIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
|
||||
typedef void (GLAPIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
|
||||
EOT
|
||||
|
||||
# Remove glGetPointerv from GL_KHR_debug
|
||||
|
@ -38,13 +38,24 @@
|
||||
* GL needs GLAPI and GLAPIENTRY, GLU needs APIENTRY, CALLBACK, and wchar_t
|
||||
* defined properly.
|
||||
*/
|
||||
/* <windef.h> */
|
||||
#ifndef APIENTRY
|
||||
/* <windef.h> and <gl.h>*/
|
||||
#ifdef APIENTRY
|
||||
# ifndef GLAPIENTRY
|
||||
# define GLAPIENTRY APIENTRY
|
||||
# endif
|
||||
# ifndef GLEWAPIENTRY
|
||||
# define GLEWAPIENTRY APIENTRY
|
||||
# endif
|
||||
#else
|
||||
#define GLEW_APIENTRY_DEFINED
|
||||
# if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
# define APIENTRY __stdcall
|
||||
# elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
|
||||
# if defined(__MINGW32__) || defined(__CYGWIN__) || (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
|
||||
# define APIENTRY __stdcall
|
||||
# ifndef GLAPIENTRY
|
||||
# define GLAPIENTRY __stdcall
|
||||
# endif
|
||||
# ifndef GLEWAPIENTRY
|
||||
# define GLEWAPIENTRY __stdcall
|
||||
# endif
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
@ -101,14 +112,6 @@ typedef _W64 int ptrdiff_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAPIENTRY
|
||||
#define GLAPIENTRY APIENTRY
|
||||
#endif
|
||||
|
||||
#ifndef GLEWAPIENTRY
|
||||
#define GLEWAPIENTRY APIENTRY
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GLEW_STATIC is defined for static library.
|
||||
* GLEW_BUILD is defined for building the DLL library.
|
||||
@ -170,6 +173,8 @@ typedef _W64 int ptrdiff_t;
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#ifndef GLAPIENTRY
|
||||
#define GLAPIENTRY
|
||||
#endif
|
||||
@ -178,8 +183,6 @@ typedef _W64 int ptrdiff_t;
|
||||
#define GLEWAPIENTRY
|
||||
#endif
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -54,8 +54,6 @@ GLEWAPI const GLubyte * GLEWAPIENTRY glewGetString (GLenum name);
|
||||
#ifdef GLEW_APIENTRY_DEFINED
|
||||
#undef GLEW_APIENTRY_DEFINED
|
||||
#undef APIENTRY
|
||||
#undef GLAPIENTRY
|
||||
#define GLAPIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef GLEW_CALLBACK_DEFINED
|
||||
|
@ -144,6 +144,7 @@ width="88" height="32" border="0" alt="Support This Project"></a></td></tr> -->
|
||||
</ul>
|
||||
|
||||
Ubuntu: <pre>sudo apt-get install libXmu-dev libXi-dev libgl-dev dos2unix</pre>
|
||||
Fedora: <pre>sudo yum install libXmu-devel libXi-devel libGL-devel dos2unix</pre>
|
||||
<!-- begin footer.html -->
|
||||
</td></tr></table></body>
|
||||
<!-- end footer.html -->
|
||||
|
Loading…
Reference in New Issue
Block a user