comparison src/video/wincommon/SDL_wingl_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
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 /* WGL implementation of SDL OpenGL support */ 23 /* WGL implementation of SDL OpenGL support */
24 24
25 #include "SDL_sysvideo.h" 25 #include "../SDL_sysvideo.h"
26 26
27 27
28 struct SDL_PrivateGLData { 28 struct SDL_PrivateGLData {
29 int gl_active; /* to stop switching drivers while we have a valid context */ 29 int gl_active; /* to stop switching drivers while we have a valid context */
30 30
31 #ifdef HAVE_OPENGL 31 #if SDL_VIDEO_OPENGL
32 PIXELFORMATDESCRIPTOR GL_pfd; 32 PIXELFORMATDESCRIPTOR GL_pfd;
33 HDC GL_hdc; 33 HDC GL_hdc;
34 HGLRC GL_hrc; 34 HGLRC GL_hrc;
35 int pixel_format; 35 int pixel_format;
36 int WGL_ARB_pixel_format; 36 int WGL_ARB_pixel_format;
50 BOOL (WINAPI *wglGetPixelFormatAttribivARB)(HDC hdc, int iPixelFormat, 50 BOOL (WINAPI *wglGetPixelFormatAttribivARB)(HDC hdc, int iPixelFormat,
51 int iLayerPlane, 51 int iLayerPlane,
52 UINT nAttributes, 52 UINT nAttributes,
53 const int *piAttributes, 53 const int *piAttributes,
54 int *piValues); 54 int *piValues);
55 #endif /* HAVE_OPENGL */ 55 #endif /* SDL_VIDEO_OPENGL */
56 }; 56 };
57 57
58 /* Old variable names */ 58 /* Old variable names */
59 #define gl_active (this->gl_data->gl_active) 59 #define gl_active (this->gl_data->gl_active)
60 #define GL_pfd (this->gl_data->GL_pfd) 60 #define GL_pfd (this->gl_data->GL_pfd)
63 #define pixel_format (this->gl_data->pixel_format) 63 #define pixel_format (this->gl_data->pixel_format)
64 64
65 /* OpenGL functions */ 65 /* OpenGL functions */
66 extern int WIN_GL_SetupWindow(_THIS); 66 extern int WIN_GL_SetupWindow(_THIS);
67 extern void WIN_GL_ShutDown(_THIS); 67 extern void WIN_GL_ShutDown(_THIS);
68 #ifdef HAVE_OPENGL 68 #if SDL_VIDEO_OPENGL
69 extern int WIN_GL_MakeCurrent(_THIS); 69 extern int WIN_GL_MakeCurrent(_THIS);
70 extern int WIN_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value); 70 extern int WIN_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value);
71 extern void WIN_GL_SwapBuffers(_THIS); 71 extern void WIN_GL_SwapBuffers(_THIS);
72 extern void WIN_GL_UnloadLibrary(_THIS); 72 extern void WIN_GL_UnloadLibrary(_THIS);
73 extern int WIN_GL_LoadLibrary(_THIS, const char* path); 73 extern int WIN_GL_LoadLibrary(_THIS, const char* path);
74 extern void *WIN_GL_GetProcAddress(_THIS, const char* proc); 74 extern void *WIN_GL_GetProcAddress(_THIS, const char* proc);
75 #endif 75 #endif
76 76
77 #ifdef HAVE_OPENGL 77 #if SDL_VIDEO_OPENGL
78 78
79 #ifndef WGL_ARB_pixel_format 79 #ifndef WGL_ARB_pixel_format
80 #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 80 #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
81 #define WGL_DRAW_TO_WINDOW_ARB 0x2001 81 #define WGL_DRAW_TO_WINDOW_ARB 0x2001
82 #define WGL_DRAW_TO_BITMAP_ARB 0x2002 82 #define WGL_DRAW_TO_BITMAP_ARB 0x2002