X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2F3dengfx%2Fsrc%2Ffxwt%2Fgfx_library.h;fp=src%2F3dengfx%2Fsrc%2Ffxwt%2Fgfx_library.h;h=c06385db25e97840604fa06900e7bf4407d91487;hb=6e23259dbabaeb1711a2a5ca25b9cb421f693759;hp=0000000000000000000000000000000000000000;hpb=fe068fa879814784c45e0cb2e65dac489e8f5594;p=summerhack diff --git a/src/3dengfx/src/fxwt/gfx_library.h b/src/3dengfx/src/fxwt/gfx_library.h new file mode 100644 index 0000000..c06385d --- /dev/null +++ b/src/3dengfx/src/fxwt/gfx_library.h @@ -0,0 +1,60 @@ +#ifndef _GFX_LIBRARY_H_ +#define _GFX_LIBRARY_H_ + +#include "3dengfx_config.h" + +#ifndef GFX_LIBRARY +#error "no gfx library specified, please reconfigure" +#endif /* GFX_LIBRARY */ + +#if GFX_LIBRARY == SDL +#include "SDL.h" +#define glGetProcAddress(x) SDL_GL_GetProcAddress(x) +#endif /* SDL */ + +#if GFX_LIBRARY == GLUT +#include +#endif /* GLUT */ + +#if GFX_LIBRARY == GTK +#include +#include +#endif /* GTK */ + +#if GFX_LIBRARY == GTKMM +#include +#include +#endif /* GTKMM */ + +#if GFX_LIBRARY == NATIVE + +#if NATIVE_LIB == NATIVE_X11 +#include +#include +#include +#endif /* X11 */ + +#if NATIVE_LIB == NATIVE_WIN32 +#include +#endif /* WIN32 */ + +#endif /* GFX_LIBRARY == NATIVE */ + +#if GFX_LIBRARY != SDL + +#if defined(__unix__) +#include + +#define glGetProcAddress(x) glXGetProcAddress((unsigned char*)x) + +#ifndef GLX_ARB_get_proc_address +void *glXGetProcAddress(const char *name); +#endif /* GLX_ARB_get_proc_address */ + +#elif defined(WIN32) || defined(__WIN32__) +#define glGetProcAddress(x) wglGetProcAddress(x) +#endif /* __unix__ */ + +#endif /* GFX_LIBRARY != SDL */ + +#endif /* _GFX_LIBRARY_H_ */