slouken@1913
|
1 |
/*
|
slouken@5535
|
2 |
Simple DirectMedia Layer
|
slouken@6138
|
3 |
Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
|
slouken@1913
|
4 |
|
slouken@5535
|
5 |
This software is provided 'as-is', without any express or implied
|
slouken@5535
|
6 |
warranty. In no event will the authors be held liable for any damages
|
slouken@5535
|
7 |
arising from the use of this software.
|
slouken@1913
|
8 |
|
slouken@5535
|
9 |
Permission is granted to anyone to use this software for any purpose,
|
slouken@5535
|
10 |
including commercial applications, and to alter it and redistribute it
|
slouken@5535
|
11 |
freely, subject to the following restrictions:
|
slouken@1913
|
12 |
|
slouken@5535
|
13 |
1. The origin of this software must not be misrepresented; you must not
|
slouken@5535
|
14 |
claim that you wrote the original software. If you use this software
|
slouken@5535
|
15 |
in a product, an acknowledgment in the product documentation would be
|
slouken@5535
|
16 |
appreciated but is not required.
|
slouken@5535
|
17 |
2. Altered source versions must be plainly marked as such, and must not be
|
slouken@5535
|
18 |
misrepresented as being the original software.
|
slouken@5535
|
19 |
3. This notice may not be removed or altered from any source distribution.
|
slouken@1913
|
20 |
*/
|
slouken@1913
|
21 |
#include "SDL_config.h"
|
slouken@1913
|
22 |
|
slouken@5062
|
23 |
#ifndef _SDL_windowsopengl_h
|
slouken@5062
|
24 |
#define _SDL_windowsopengl_h
|
slouken@1913
|
25 |
|
slouken@1952
|
26 |
#if SDL_VIDEO_OPENGL_WGL
|
slouken@1913
|
27 |
|
slouken@1913
|
28 |
struct SDL_GLDriverData
|
slouken@1913
|
29 |
{
|
icculus@6382
|
30 |
SDL_bool HAS_WGL_ARB_pixel_format;
|
icculus@6382
|
31 |
SDL_bool HAS_WGL_EXT_swap_control_tear;
|
slouken@1913
|
32 |
|
slouken@1913
|
33 |
void *(WINAPI * wglGetProcAddress) (const char *proc);
|
slouken@1913
|
34 |
HGLRC(WINAPI * wglCreateContext) (HDC hdc);
|
slouken@1913
|
35 |
BOOL(WINAPI * wglDeleteContext) (HGLRC hglrc);
|
slouken@1913
|
36 |
BOOL(WINAPI * wglMakeCurrent) (HDC hdc, HGLRC hglrc);
|
slouken@1913
|
37 |
BOOL(WINAPI * wglChoosePixelFormatARB) (HDC hdc,
|
slouken@1913
|
38 |
const int *piAttribIList,
|
slouken@1913
|
39 |
const FLOAT * pfAttribFList,
|
slouken@1913
|
40 |
UINT nMaxFormats,
|
slouken@1913
|
41 |
int *piFormats,
|
slouken@1913
|
42 |
UINT * nNumFormats);
|
slouken@1913
|
43 |
BOOL(WINAPI * wglGetPixelFormatAttribivARB) (HDC hdc, int iPixelFormat,
|
slouken@1913
|
44 |
int iLayerPlane,
|
slouken@1913
|
45 |
UINT nAttributes,
|
slouken@1913
|
46 |
const int *piAttributes,
|
slouken@1913
|
47 |
int *piValues);
|
icculus@6384
|
48 |
BOOL (WINAPI * wglSwapIntervalEXT) (int interval);
|
slouken@1913
|
49 |
int (WINAPI * wglGetSwapIntervalEXT) (void);
|
slouken@1913
|
50 |
};
|
slouken@1913
|
51 |
|
slouken@1913
|
52 |
/* OpenGL functions */
|
slouken@1913
|
53 |
extern int WIN_GL_LoadLibrary(_THIS, const char *path);
|
slouken@1913
|
54 |
extern void *WIN_GL_GetProcAddress(_THIS, const char *proc);
|
slouken@3057
|
55 |
extern void WIN_GL_UnloadLibrary(_THIS);
|
slouken@1913
|
56 |
extern int WIN_GL_SetupWindow(_THIS, SDL_Window * window);
|
slouken@1913
|
57 |
extern SDL_GLContext WIN_GL_CreateContext(_THIS, SDL_Window * window);
|
slouken@1913
|
58 |
extern int WIN_GL_MakeCurrent(_THIS, SDL_Window * window,
|
slouken@1913
|
59 |
SDL_GLContext context);
|
slouken@1913
|
60 |
extern int WIN_GL_SetSwapInterval(_THIS, int interval);
|
slouken@1913
|
61 |
extern int WIN_GL_GetSwapInterval(_THIS);
|
slouken@1913
|
62 |
extern void WIN_GL_SwapWindow(_THIS, SDL_Window * window);
|
slouken@1913
|
63 |
extern void WIN_GL_DeleteContext(_THIS, SDL_GLContext context);
|
slouken@1913
|
64 |
|
slouken@1913
|
65 |
#ifndef WGL_ARB_pixel_format
|
slouken@1913
|
66 |
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
slouken@1913
|
67 |
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
slouken@1913
|
68 |
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
slouken@1913
|
69 |
#define WGL_ACCELERATION_ARB 0x2003
|
slouken@1913
|
70 |
#define WGL_NEED_PALETTE_ARB 0x2004
|
slouken@1913
|
71 |
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
slouken@1913
|
72 |
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
slouken@1913
|
73 |
#define WGL_SWAP_METHOD_ARB 0x2007
|
slouken@1913
|
74 |
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
slouken@1913
|
75 |
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
slouken@1913
|
76 |
#define WGL_TRANSPARENT_ARB 0x200A
|
slouken@1913
|
77 |
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
slouken@1913
|
78 |
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
slouken@1913
|
79 |
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
slouken@1913
|
80 |
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
slouken@1913
|
81 |
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
slouken@1913
|
82 |
#define WGL_SHARE_DEPTH_ARB 0x200C
|
slouken@1913
|
83 |
#define WGL_SHARE_STENCIL_ARB 0x200D
|
slouken@1913
|
84 |
#define WGL_SHARE_ACCUM_ARB 0x200E
|
slouken@1913
|
85 |
#define WGL_SUPPORT_GDI_ARB 0x200F
|
slouken@1913
|
86 |
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
slouken@1913
|
87 |
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
slouken@1913
|
88 |
#define WGL_STEREO_ARB 0x2012
|
slouken@1913
|
89 |
#define WGL_PIXEL_TYPE_ARB 0x2013
|
slouken@1913
|
90 |
#define WGL_COLOR_BITS_ARB 0x2014
|
slouken@1913
|
91 |
#define WGL_RED_BITS_ARB 0x2015
|
slouken@1913
|
92 |
#define WGL_RED_SHIFT_ARB 0x2016
|
slouken@1913
|
93 |
#define WGL_GREEN_BITS_ARB 0x2017
|
slouken@1913
|
94 |
#define WGL_GREEN_SHIFT_ARB 0x2018
|
slouken@1913
|
95 |
#define WGL_BLUE_BITS_ARB 0x2019
|
slouken@1913
|
96 |
#define WGL_BLUE_SHIFT_ARB 0x201A
|
slouken@1913
|
97 |
#define WGL_ALPHA_BITS_ARB 0x201B
|
slouken@1913
|
98 |
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
slouken@1913
|
99 |
#define WGL_ACCUM_BITS_ARB 0x201D
|
slouken@1913
|
100 |
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
slouken@1913
|
101 |
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
slouken@1913
|
102 |
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
slouken@1913
|
103 |
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
slouken@1913
|
104 |
#define WGL_DEPTH_BITS_ARB 0x2022
|
slouken@1913
|
105 |
#define WGL_STENCIL_BITS_ARB 0x2023
|
slouken@1913
|
106 |
#define WGL_AUX_BUFFERS_ARB 0x2024
|
slouken@1913
|
107 |
#define WGL_NO_ACCELERATION_ARB 0x2025
|
slouken@1913
|
108 |
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
slouken@1913
|
109 |
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
slouken@1913
|
110 |
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
slouken@1913
|
111 |
#define WGL_SWAP_COPY_ARB 0x2029
|
slouken@1913
|
112 |
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
slouken@1913
|
113 |
#define WGL_TYPE_RGBA_ARB 0x202B
|
slouken@1913
|
114 |
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
slouken@1913
|
115 |
#endif
|
slouken@1913
|
116 |
|
slouken@1913
|
117 |
#ifndef WGL_ARB_multisample
|
slouken@1913
|
118 |
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
slouken@1913
|
119 |
#define WGL_SAMPLES_ARB 0x2042
|
slouken@1913
|
120 |
#endif
|
slouken@1913
|
121 |
|
slouken@1952
|
122 |
#endif /* SDL_VIDEO_OPENGL_WGL */
|
slouken@1913
|
123 |
|
slouken@5062
|
124 |
#endif /* _SDL_windowsopengl_h */
|
slouken@1913
|
125 |
|
slouken@1913
|
126 |
/* vi: set ts=4 sw=4 expandtab: */
|