Fix the #include order for config.h.
[wine] / include / wine_gl.h
1 /* Wrapper for OpenGL includes...
2      Copyright 1998 - Lionel Ulmer
3
4    This wrapper is needed because Mesa uses also the CALLBACK / WINAPI
5    constants. */
6
7 #ifndef __WINE_WINE_GL_H
8 #define __WINE_WINE_GL_H
9
10 #ifndef __WINE_CONFIG_H 
11 # error You must include config.h to use this header 
12 #endif 
13
14 #if defined(HAVE_OPENGL)
15
16 #include "ts_xlib.h"
17
18 /* As GLX relies on X, this is needed */
19 #define ENTER_GL() wine_tsx11_lock()
20 #define LEAVE_GL() wine_tsx11_unlock()
21
22 #undef APIENTRY
23 #undef CALLBACK
24 #undef WINAPI
25
26 #define XMD_H /* This is to prevent the Xmd.h inclusion bug to happen :-/ */
27 #include <GL/gl.h>
28 #include <GL/glx.h>
29 #ifdef HAVE_GL_GLEXT_H
30 # include <GL/glext.h>
31 #endif
32 #undef  XMD_H
33
34 #undef APIENTRY
35 #undef CALLBACK
36 #undef WINAPI
37
38 /* Redefines the constants */
39 #define CALLBACK    __stdcall
40 #define WINAPI      __stdcall
41 #define APIENTRY    WINAPI
42
43 #endif /* HAVE_OPENGL */
44
45 #endif /* __WINE_WINE_GL_H */