|
kusano |
7d535a |
/* ------------------------------------------------------------------------- */
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
/* error codes */
|
|
kusano |
7d535a |
#define GLEW_OK 0
|
|
kusano |
7d535a |
#define GLEW_NO_ERROR 0
|
|
kusano |
7d535a |
#define GLEW_ERROR_NO_GL_VERSION 1 /* missing GL version */
|
|
kusano |
7d535a |
#define GLEW_ERROR_GL_VERSION_10_ONLY 2 /* Need at least OpenGL 1.1 */
|
|
kusano |
7d535a |
#define GLEW_ERROR_GLX_VERSION_11_ONLY 3 /* Need at least GLX 1.2 */
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
/* string codes */
|
|
kusano |
7d535a |
#define GLEW_VERSION 1
|
|
kusano |
7d535a |
#define GLEW_VERSION_MAJOR 2
|
|
kusano |
7d535a |
#define GLEW_VERSION_MINOR 3
|
|
kusano |
7d535a |
#define GLEW_VERSION_MICRO 4
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
/* API */
|
|
kusano |
7d535a |
#ifdef GLEW_MX
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
typedef struct GLEWContextStruct GLEWContext;
|
|
kusano |
7d535a |
GLEWAPI GLenum GLEWAPIENTRY glewContextInit (GLEWContext *ctx);
|
|
kusano |
7d535a |
GLEWAPI GLboolean GLEWAPIENTRY glewContextIsSupported (const GLEWContext *ctx, const char *name);
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#define glewInit() glewContextInit(glewGetContext())
|
|
kusano |
7d535a |
#define glewIsSupported(x) glewContextIsSupported(glewGetContext(), x)
|
|
kusano |
7d535a |
#define glewIsExtensionSupported(x) glewIsSupported(x)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#define GLEW_GET_VAR(x) (*(const GLboolean*)&(glewGetContext()->x))
|
|
kusano |
7d535a |
#ifdef _WIN32
|
|
kusano |
7d535a |
# define GLEW_GET_FUN(x) glewGetContext()->x
|
|
kusano |
7d535a |
#else
|
|
kusano |
7d535a |
# define GLEW_GET_FUN(x) x
|
|
kusano |
7d535a |
#endif
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#else /* GLEW_MX */
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
GLEWAPI GLenum GLEWAPIENTRY glewInit (void);
|
|
kusano |
7d535a |
GLEWAPI GLboolean GLEWAPIENTRY glewIsSupported (const char *name);
|
|
kusano |
7d535a |
#define glewIsExtensionSupported(x) glewIsSupported(x)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#define GLEW_GET_VAR(x) (*(const GLboolean*)&x)
|
|
kusano |
7d535a |
#define GLEW_GET_FUN(x) x
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#endif /* GLEW_MX */
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
GLEWAPI GLboolean glewExperimental;
|
|
kusano |
7d535a |
GLEWAPI GLboolean GLEWAPIENTRY glewGetExtension (const char *name);
|
|
kusano |
7d535a |
GLEWAPI const GLubyte * GLEWAPIENTRY glewGetErrorString (GLenum error);
|
|
kusano |
7d535a |
GLEWAPI const GLubyte * GLEWAPIENTRY glewGetString (GLenum name);
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#ifdef __cplusplus
|
|
kusano |
7d535a |
}
|
|
kusano |
7d535a |
#endif
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#ifdef GLEW_APIENTRY_DEFINED
|
|
kusano |
7d535a |
#undef GLEW_APIENTRY_DEFINED
|
|
kusano |
7d535a |
#undef APIENTRY
|
|
kusano |
7d535a |
#undef GLAPIENTRY
|
|
kusano |
7d535a |
#define GLAPIENTRY
|
|
kusano |
7d535a |
#endif
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#ifdef GLEW_CALLBACK_DEFINED
|
|
kusano |
7d535a |
#undef GLEW_CALLBACK_DEFINED
|
|
kusano |
7d535a |
#undef CALLBACK
|
|
kusano |
7d535a |
#endif
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#ifdef GLEW_WINGDIAPI_DEFINED
|
|
kusano |
7d535a |
#undef GLEW_WINGDIAPI_DEFINED
|
|
kusano |
7d535a |
#undef WINGDIAPI
|
|
kusano |
7d535a |
#endif
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#undef GLAPI
|
|
kusano |
7d535a |
/* #undef GLEWAPI */
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#endif /* __glew_h__ */
|