2 * Mesa 3-D graphics library
5 * Copyright (C) 1999 Brian Paul All Rights Reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 /* prototypes for the Mesa WGL functions */
27 /* relocated here so that I could make GLUT get them properly */
42 #if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
43 # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
44 # define GLAPI __declspec(dllexport)
45 # define WGLAPI __declspec(dllexport)
46 # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
47 # define GLAPI __declspec(dllimport)
48 # define WGLAPI __declspec(dllimport)
49 # else /* for use with static link lib build of Win32 edition only */
51 # define WGLAPI __declspec(dllimport)
52 # endif /* _STATIC_MESA support */
53 # define GLAPIENTRY __stdcall
55 /* non-Windows compilation */
58 #endif /* WIN32 / CYGWIN32 bracket */
61 #if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
62 #ifndef _GNU_H_WINDOWS32_FUNCTIONS
64 # define wglUseFontBitmaps wglUseFontBitmapsW
65 # define wglUseFontOutlines wglUseFontOutlinesW
67 # define wglUseFontBitmaps wglUseFontBitmapsA
68 # define wglUseFontOutlines wglUseFontOutlinesA
69 # endif /* !UNICODE */
70 #endif /* _GNU_H_WINDOWS32_FUNCTIONS */
71 typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR
, *PLAYERPLANEDESCRIPTOR
, *LPLAYERPLANEDESCRIPTOR
;
72 typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT
, *PGLYPHMETRICSFLOAT
, *LPGLYPHMETRICSFLOAT
;
73 typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR
, *PPIXELFORMATDESCRIPTOR
, *LPPIXELFORMATDESCRIPTOR
;
78 # pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
79 # pragma warning( push )
80 # pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
83 WGLAPI
int GLAPIENTRY
wglDeleteContext(HGLRC
);
84 WGLAPI
int GLAPIENTRY
wglMakeCurrent(HDC
,HGLRC
);
85 WGLAPI
int GLAPIENTRY
wglSetPixelFormat(HDC
, int, const PIXELFORMATDESCRIPTOR
*);
86 WGLAPI
int GLAPIENTRY
wglSwapBuffers(HDC hdc
);
87 WGLAPI HDC GLAPIENTRY
wglGetCurrentDC(void);
88 WGLAPI HGLRC GLAPIENTRY
wglCreateContext(HDC
);
89 WGLAPI HGLRC GLAPIENTRY
wglCreateLayerContext(HDC
,int);
90 WGLAPI HGLRC GLAPIENTRY
wglGetCurrentContext(void);
91 WGLAPI PROC GLAPIENTRY
wglGetProcAddress(const char*);
92 WGLAPI
int GLAPIENTRY
wglChoosePixelFormat(HDC
, const PIXELFORMATDESCRIPTOR
*);
93 WGLAPI
int GLAPIENTRY
wglCopyContext(HGLRC
, HGLRC
, unsigned int);
94 WGLAPI
int GLAPIENTRY
wglDeleteContext(HGLRC
);
95 WGLAPI
int GLAPIENTRY
wglDescribeLayerPlane(HDC
, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR
);
96 WGLAPI
int GLAPIENTRY
wglDescribePixelFormat(HDC
,int, unsigned int, LPPIXELFORMATDESCRIPTOR
);
97 WGLAPI
int GLAPIENTRY
wglGetLayerPaletteEntries(HDC
, int, int, int,COLORREF
*);
98 WGLAPI
int GLAPIENTRY
wglGetPixelFormat(HDC hdc
);
99 WGLAPI
int GLAPIENTRY
wglMakeCurrent(HDC
, HGLRC
);
100 WGLAPI
int GLAPIENTRY
wglRealizeLayerPalette(HDC
, int, int);
101 WGLAPI
int GLAPIENTRY
wglSetLayerPaletteEntries(HDC
, int, int, int,const COLORREF
*);
102 WGLAPI
int GLAPIENTRY
wglShareLists(HGLRC
, HGLRC
);
103 WGLAPI
int GLAPIENTRY
wglSwapLayerBuffers(HDC
, unsigned int);
104 WGLAPI
int GLAPIENTRY
wglUseFontBitmapsA(HDC
, unsigned long, unsigned long, unsigned long);
105 WGLAPI
int GLAPIENTRY
wglUseFontBitmapsW(HDC
, unsigned long, unsigned long, unsigned long);
106 WGLAPI
int GLAPIENTRY
wglUseFontOutlinesA(HDC
, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT
);
107 WGLAPI
int GLAPIENTRY
wglUseFontOutlinesW(HDC
, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT
);
108 WGLAPI
int GLAPIENTRY
SwapBuffers(HDC
);
109 WGLAPI
int GLAPIENTRY
ChoosePixelFormat(HDC
,const PIXELFORMATDESCRIPTOR
*);
110 WGLAPI
int GLAPIENTRY
DescribePixelFormat(HDC
,int,unsigned int,LPPIXELFORMATDESCRIPTOR
);
111 WGLAPI
int GLAPIENTRY
GetPixelFormat(HDC
);
112 WGLAPI
int GLAPIENTRY
SetPixelFormat(HDC
,int,const PIXELFORMATDESCRIPTOR
*);
115 #ifndef WGL_ARB_extensions_string
116 #define WGL_ARB_extensions_string 1
118 WGLAPI
const char * GLAPIENTRY
wglGetExtensionsStringARB(HDC hdc
);
120 #endif /* WGL_ARB_extensions_string */
124 # pragma warning( pop )
132 #endif /* _mesa_wgl_h_ */