Pyrogenesis  trunk
wgl.h
Go to the documentation of this file.
1 /* Copyright (c) 2010 Wildfire Games
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining
4  * a copy of this software and associated documentation files (the
5  * "Software"), to deal in the Software without restriction, including
6  * without limitation the rights to use, copy, modify, merge, publish,
7  * distribute, sublicense, and/or sell copies of the Software, and to
8  * permit persons to whom the Software is furnished to do so, subject to
9  * the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 /*
24  * Windows definitions required for GL/gl.h
25  */
26 
27 // RAGE! Win32 OpenGL headers are full of crap we have to emulate
28 // (must not include windows.h)
29 
30 #ifndef WGL_HEADER_NEEDED
31 #error "wgl.h: why is this included from anywhere but ogl.h?"
32 #endif
33 
34 
35 #ifndef WINGDIAPI
36 #define WINGDIAPI __declspec(dllimport)
37 #endif
38 #ifndef CALLBACK
39 #define CALLBACK __stdcall
40 #endif
41 #ifndef APIENTRY
42 #define APIENTRY __stdcall
43 #endif
44 #ifndef WINAPI
45 #define WINAPI __stdcall
46 #endif
47 
48 #ifndef DECLARE_HANDLE
49 typedef void VOID;
50 typedef void* LPVOID;
51 typedef int BOOL;
52 typedef unsigned short USHORT;
53 typedef int INT;
54 typedef unsigned int UINT;
55 typedef long LONG;
56 typedef unsigned long DWORD;
57 typedef int INT32;
58 typedef __int64 INT64;
59 typedef float FLOAT;
60 typedef char CHAR;
61 typedef const char* LPCSTR;
62 typedef void* HANDLE;
63 typedef int (*PROC)();
64 struct RECT
65 {
70 };
71 #define DECLARE_HANDLE(name) typedef HANDLE name
72 DECLARE_HANDLE(HDC);
73 DECLARE_HANDLE(HGLRC);
74 #endif
75 
76 // VC6 doesn't define wchar_t as built-in type
77 #ifndef _WCHAR_T_DEFINED
78 typedef unsigned short wchar_t; // for glu.h
79 #define _WCHAR_T_DEFINED
80 #endif
81 
82 WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC, HGLRC, UINT);
84 WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int);
90 WINGDIAPI BOOL WINAPI wglShareLists(HGLRC, HGLRC);
int(* PROC)()
Definition: wgl.h:63
WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int)
int INT
Definition: wgl.h:53
unsigned short USHORT
Definition: wgl.h:52
WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC)
int BOOL
Definition: wgl.h:51
char CHAR
Definition: wgl.h:60
LONG left
Definition: wgl.h:66
LONG top
Definition: wgl.h:67
WINGDIAPI HGLRC WINAPI wglCreateContext(HDC)
void * HANDLE
Definition: wgl.h:62
unsigned long DWORD
Definition: wgl.h:56
void VOID
Definition: wgl.h:49
int INT32
Definition: wgl.h:57
WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD)
LONG right
Definition: wgl.h:68
WINGDIAPI HDC WINAPI wglGetCurrentDC()
WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD)
WINGDIAPI HGLRC WINAPI wglGetCurrentContext()
WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR)
WINGDIAPI BOOL WINAPI wglShareLists(HGLRC, HGLRC)
Definition: wgl.h:64
unsigned short wchar_t
Definition: wgl.h:78
LONG bottom
Definition: wgl.h:69
unsigned int UINT
Definition: wgl.h:54
void * LPVOID
Definition: wgl.h:50
WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC, HGLRC, UINT)
__int64 INT64
Definition: wgl.h:58
long LONG
Definition: wgl.h:55
const char * LPCSTR
Definition: wgl.h:61
#define DECLARE_HANDLE(name)
Definition: wgl.h:71
WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC, HGLRC)
float FLOAT
Definition: wgl.h:59
#define WINAPI
Definition: wgl.h:45
#define WINGDIAPI
Definition: wgl.h:36