added 3dengfx into the repo, probably not the correct version for this
[summerhack] / src / 3dengfx / src / fxwt / gfx_library.h
1 #ifndef _GFX_LIBRARY_H_
2 #define _GFX_LIBRARY_H_
3
4 #include "3dengfx_config.h"
5
6 #ifndef GFX_LIBRARY
7 #error "no gfx library specified, please reconfigure"
8 #endif  /* GFX_LIBRARY */
9
10 #if GFX_LIBRARY == SDL
11 #include "SDL.h"
12 #define glGetProcAddress(x) SDL_GL_GetProcAddress(x)
13 #endif  /* SDL */
14
15 #if GFX_LIBRARY == GLUT
16 #include <GL/glut.h>
17 #endif  /* GLUT */
18
19 #if GFX_LIBRARY == GTK
20 #include <gtk/gtk.h>
21 #include <gtk/gtkgl.h>
22 #endif  /* GTK */
23
24 #if GFX_LIBRARY == GTKMM
25 #include <gtkmm.h>
26 #include <gtkglmm.h>
27 #endif  /* GTKMM */
28
29 #if GFX_LIBRARY == NATIVE
30
31 #if NATIVE_LIB == NATIVE_X11
32 #include <X11/Xlib.h>
33 #include <X11/Xutil.h>
34 #include <GL/glx.h>
35 #endif  /* X11 */
36
37 #if NATIVE_LIB == NATIVE_WIN32
38 #include <windows.h>
39 #endif  /* WIN32 */
40
41 #endif  /* GFX_LIBRARY == NATIVE */
42
43 #if GFX_LIBRARY != SDL
44
45 #if defined(__unix__)
46 #include <GL/glx.h>
47
48 #define glGetProcAddress(x)             glXGetProcAddress((unsigned char*)x)
49
50 #ifndef GLX_ARB_get_proc_address
51 void *glXGetProcAddress(const char *name);
52 #endif  /* GLX_ARB_get_proc_address */
53
54 #elif defined(WIN32) || defined(__WIN32__)
55 #define glGetProcAddress(x)             wglGetProcAddress(x)
56 #endif /* __unix__ */
57
58 #endif /* GFX_LIBRARY != SDL */
59
60 #endif  /* _GFX_LIBRARY_H_ */