1 /*
2  * File: wgl_ext_api.h
3  * Purpose: Wrapper functions for Win32 OpenGL wgl extension functions
4  *
5  * Authors: Jon TURNEY
6  *
7  * Copyright (c) Jon TURNEY 2009
8  *
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a
11  * copy of this software and associated documentation files (the "Software"),
12  * to deal in the Software without restriction, including without limitation
13  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  * and/or sell copies of the Software, and to permit persons to whom the
15  * Software is furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included in
18  * all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23  * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
24  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26  * DEALINGS IN THE SOFTWARE.
27  */
28 
29 #ifndef wgl_ext_api_h
30 #define wgl_ext_api_h
31 
32 #include <GL/wglext.h>
33 
34 void wglResolveExtensionProcs(void);
35 
36 /*
37   Prototypes for wrapper functions we actually use
38   XXX: should be automatically generated as well
39 */
40 
41 const char *wglGetExtensionsStringARBWrapper(HDC hdc);
42 BOOL wglMakeContextCurrentARBWrapper(HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
43 HDC wglGetCurrentReadDCARBWrapper(VOID);
44 
45 BOOL wglGetPixelFormatAttribivARBWrapper(HDC hdc,
46                                          int iPixelFormat,
47                                          int iLayerPlane,
48                                          UINT nAttributes,
49                                          const int *piAttributes,
50                                          int *piValues);
51 
52 BOOL wglGetPixelFormatAttribfvARBWrapper(HDC hdc,
53                                          int iPixelFormat,
54                                          int iLayerPlane,
55                                          UINT nAttributes,
56                                          const int *piAttributes,
57                                          FLOAT * pfValues);
58 
59 BOOL wglChoosePixelFormatARBWrapper(HDC hdc,
60                                     const int *piAttribIList,
61                                     const FLOAT * pfAttribFList,
62                                     UINT nMaxFormats,
63                                     int *piFormats, UINT * nNumFormats);
64 
65 HPBUFFERARB wglCreatePbufferARBWrapper(HDC hDC,
66                                        int iPixelFormat,
67                                        int iWidth,
68                                        int iHeight, const int *piAttribList);
69 
70 HDC wglGetPbufferDCARBWrapper(HPBUFFERARB hPbuffer);
71 
72 int wglReleasePbufferDCARBWrapper(HPBUFFERARB hPbuffer, HDC hDC);
73 
74 BOOL wglDestroyPbufferARBWrapper(HPBUFFERARB hPbuffer);
75 
76 BOOL wglQueryPbufferARBWrapper(HPBUFFERARB hPbuffer,
77                                int iAttribute, int *piValue);
78 
79 BOOL wglSwapIntervalEXTWrapper(int interval);
80 
81 int wglGetSwapIntervalEXTWrapper(void);
82 
83 #endif                          /* wgl_ext_api_h */
84