Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11gl_c.h @ 1361:19418e4422cb
New configure-based build system. Still work in progress, but much improved
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 16 Feb 2006 10:11:48 +0000 |
parents | e94b0d7c33bc |
children | d910939febfa |
comparison
equal
deleted
inserted
replaced
1360:70a9cfb4cf1b | 1361:19418e4422cb |
---|---|
18 | 18 |
19 Sam Lantinga | 19 Sam Lantinga |
20 slouken@libsdl.org | 20 slouken@libsdl.org |
21 */ | 21 */ |
22 | 22 |
23 #ifdef HAVE_OPENGL_X11 | 23 #if SDL_VIDEO_OPENGL_GLX |
24 #include <GL/glx.h> | 24 #include <GL/glx.h> |
25 #ifdef USE_DLOPEN | |
26 #include <dlfcn.h> | |
27 #else | |
28 #include "SDL_loadso.h" | 25 #include "SDL_loadso.h" |
29 #endif | 26 #endif |
30 #endif | |
31 | 27 |
32 #include "SDL_sysvideo.h" | 28 #include "../SDL_sysvideo.h" |
33 | 29 |
34 struct SDL_PrivateGLData { | 30 struct SDL_PrivateGLData { |
35 int gl_active; /* to stop switching drivers while we have a valid context */ | 31 int gl_active; /* to stop switching drivers while we have a valid context */ |
36 | 32 |
37 #ifdef HAVE_OPENGL_X11 | 33 #if SDL_VIDEO_OPENGL_GLX |
38 GLXContext glx_context; /* Current GL context */ | 34 GLXContext glx_context; /* Current GL context */ |
39 XVisualInfo* glx_visualinfo; /* XVisualInfo* returned by glXChooseVisual */ | 35 XVisualInfo* glx_visualinfo; /* XVisualInfo* returned by glXChooseVisual */ |
40 | 36 |
41 void * (*glXGetProcAddress)(const GLubyte *procName); | 37 void * (*glXGetProcAddress)(const GLubyte *procName); |
42 | 38 |
73 const char *(*glXQueryExtensionsString) | 69 const char *(*glXQueryExtensionsString) |
74 ( Display* dpy, | 70 ( Display* dpy, |
75 int screen ); | 71 int screen ); |
76 | 72 |
77 | 73 |
78 #endif /* HAVE_OPENGL_X11 */ | 74 #endif /* SDL_VIDEO_OPENGL_GLX */ |
79 }; | 75 }; |
80 | 76 |
81 /* Old variable names */ | 77 /* Old variable names */ |
82 #define gl_active (this->gl_data->gl_active) | 78 #define gl_active (this->gl_data->gl_active) |
83 #define glx_context (this->gl_data->glx_context) | 79 #define glx_context (this->gl_data->glx_context) |
86 /* OpenGL functions */ | 82 /* OpenGL functions */ |
87 extern XVisualInfo *X11_GL_GetVisual(_THIS); | 83 extern XVisualInfo *X11_GL_GetVisual(_THIS); |
88 extern int X11_GL_CreateWindow(_THIS, int w, int h); | 84 extern int X11_GL_CreateWindow(_THIS, int w, int h); |
89 extern int X11_GL_CreateContext(_THIS); | 85 extern int X11_GL_CreateContext(_THIS); |
90 extern void X11_GL_Shutdown(_THIS); | 86 extern void X11_GL_Shutdown(_THIS); |
91 #ifdef HAVE_OPENGL_X11 | 87 #if SDL_VIDEO_OPENGL_GLX |
92 extern int X11_GL_MakeCurrent(_THIS); | 88 extern int X11_GL_MakeCurrent(_THIS); |
93 extern int X11_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value); | 89 extern int X11_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value); |
94 extern void X11_GL_SwapBuffers(_THIS); | 90 extern void X11_GL_SwapBuffers(_THIS); |
95 extern int X11_GL_LoadLibrary(_THIS, const char* path); | 91 extern int X11_GL_LoadLibrary(_THIS, const char* path); |
96 extern void *X11_GL_GetProcAddress(_THIS, const char* proc); | 92 extern void *X11_GL_GetProcAddress(_THIS, const char* proc); |