1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
11 #ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_WGL_H_
12 #define UI_GFX_GL_GL_BINDINGS_AUTOGEN_WGL_H_
18 typedef BOOL(GL_BINDING_CALL
* wglChoosePixelFormatARBProc
)(
20 const int* int_attrib_list
,
21 const float* float_attrib_list
,
25 typedef BOOL(GL_BINDING_CALL
* wglCopyContextProc
)(HGLRC hglrcSrc
,
28 typedef HGLRC(GL_BINDING_CALL
* wglCreateContextProc
)(HDC hdc
);
29 typedef HGLRC(GL_BINDING_CALL
* wglCreateLayerContextProc
)(HDC hdc
,
31 typedef HPBUFFERARB(GL_BINDING_CALL
* wglCreatePbufferARBProc
)(
36 const int* piAttribList
);
37 typedef BOOL(GL_BINDING_CALL
* wglDeleteContextProc
)(HGLRC hglrc
);
38 typedef BOOL(GL_BINDING_CALL
* wglDestroyPbufferARBProc
)(HPBUFFERARB hPbuffer
);
39 typedef HGLRC(GL_BINDING_CALL
* wglGetCurrentContextProc
)();
40 typedef HDC(GL_BINDING_CALL
* wglGetCurrentDCProc
)();
41 typedef const char*(GL_BINDING_CALL
* wglGetExtensionsStringARBProc
)(HDC hDC
);
42 typedef const char*(GL_BINDING_CALL
* wglGetExtensionsStringEXTProc
)();
43 typedef HDC(GL_BINDING_CALL
* wglGetPbufferDCARBProc
)(HPBUFFERARB hPbuffer
);
44 typedef BOOL(GL_BINDING_CALL
* wglMakeCurrentProc
)(HDC hdc
, HGLRC hglrc
);
45 typedef BOOL(GL_BINDING_CALL
* wglQueryPbufferARBProc
)(HPBUFFERARB hPbuffer
,
48 typedef int(GL_BINDING_CALL
* wglReleasePbufferDCARBProc
)(HPBUFFERARB hPbuffer
,
50 typedef BOOL(GL_BINDING_CALL
* wglShareListsProc
)(HGLRC hglrc1
, HGLRC hglrc2
);
51 typedef BOOL(GL_BINDING_CALL
* wglSwapIntervalEXTProc
)(int interval
);
52 typedef BOOL(GL_BINDING_CALL
* wglSwapLayerBuffersProc
)(HDC hdc
, UINT fuPlanes
);
54 struct ExtensionsWGL
{
55 bool b_WGL_ARB_extensions_string
;
56 bool b_WGL_ARB_pbuffer
;
57 bool b_WGL_ARB_pixel_format
;
58 bool b_WGL_EXT_extensions_string
;
59 bool b_WGL_EXT_swap_control
;
63 wglChoosePixelFormatARBProc wglChoosePixelFormatARBFn
;
64 wglCopyContextProc wglCopyContextFn
;
65 wglCreateContextProc wglCreateContextFn
;
66 wglCreateLayerContextProc wglCreateLayerContextFn
;
67 wglCreatePbufferARBProc wglCreatePbufferARBFn
;
68 wglDeleteContextProc wglDeleteContextFn
;
69 wglDestroyPbufferARBProc wglDestroyPbufferARBFn
;
70 wglGetCurrentContextProc wglGetCurrentContextFn
;
71 wglGetCurrentDCProc wglGetCurrentDCFn
;
72 wglGetExtensionsStringARBProc wglGetExtensionsStringARBFn
;
73 wglGetExtensionsStringEXTProc wglGetExtensionsStringEXTFn
;
74 wglGetPbufferDCARBProc wglGetPbufferDCARBFn
;
75 wglMakeCurrentProc wglMakeCurrentFn
;
76 wglQueryPbufferARBProc wglQueryPbufferARBFn
;
77 wglReleasePbufferDCARBProc wglReleasePbufferDCARBFn
;
78 wglShareListsProc wglShareListsFn
;
79 wglSwapIntervalEXTProc wglSwapIntervalEXTFn
;
80 wglSwapLayerBuffersProc wglSwapLayerBuffersFn
;
83 class GL_EXPORT WGLApi
{
88 virtual BOOL
wglChoosePixelFormatARBFn(HDC dc
,
89 const int* int_attrib_list
,
90 const float* float_attrib_list
,
93 UINT
* num_formats
) = 0;
94 virtual BOOL
wglCopyContextFn(HGLRC hglrcSrc
, HGLRC hglrcDst
, UINT mask
) = 0;
95 virtual HGLRC
wglCreateContextFn(HDC hdc
) = 0;
96 virtual HGLRC
wglCreateLayerContextFn(HDC hdc
, int iLayerPlane
) = 0;
97 virtual HPBUFFERARB
wglCreatePbufferARBFn(HDC hDC
,
101 const int* piAttribList
) = 0;
102 virtual BOOL
wglDeleteContextFn(HGLRC hglrc
) = 0;
103 virtual BOOL
wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer
) = 0;
104 virtual HGLRC
wglGetCurrentContextFn() = 0;
105 virtual HDC
wglGetCurrentDCFn() = 0;
106 virtual const char* wglGetExtensionsStringARBFn(HDC hDC
) = 0;
107 virtual const char* wglGetExtensionsStringEXTFn() = 0;
108 virtual HDC
wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer
) = 0;
109 virtual BOOL
wglMakeCurrentFn(HDC hdc
, HGLRC hglrc
) = 0;
110 virtual BOOL
wglQueryPbufferARBFn(HPBUFFERARB hPbuffer
,
113 virtual int wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer
, HDC hDC
) = 0;
114 virtual BOOL
wglShareListsFn(HGLRC hglrc1
, HGLRC hglrc2
) = 0;
115 virtual BOOL
wglSwapIntervalEXTFn(int interval
) = 0;
116 virtual BOOL
wglSwapLayerBuffersFn(HDC hdc
, UINT fuPlanes
) = 0;
121 #define wglChoosePixelFormatARB \
122 ::gfx::g_current_wgl_context->wglChoosePixelFormatARBFn
123 #define wglCopyContext ::gfx::g_current_wgl_context->wglCopyContextFn
124 #define wglCreateContext ::gfx::g_current_wgl_context->wglCreateContextFn
125 #define wglCreateLayerContext \
126 ::gfx::g_current_wgl_context->wglCreateLayerContextFn
127 #define wglCreatePbufferARB ::gfx::g_current_wgl_context->wglCreatePbufferARBFn
128 #define wglDeleteContext ::gfx::g_current_wgl_context->wglDeleteContextFn
129 #define wglDestroyPbufferARB \
130 ::gfx::g_current_wgl_context->wglDestroyPbufferARBFn
131 #define wglGetCurrentContext \
132 ::gfx::g_current_wgl_context->wglGetCurrentContextFn
133 #define wglGetCurrentDC ::gfx::g_current_wgl_context->wglGetCurrentDCFn
134 #define wglGetExtensionsStringARB \
135 ::gfx::g_current_wgl_context->wglGetExtensionsStringARBFn
136 #define wglGetExtensionsStringEXT \
137 ::gfx::g_current_wgl_context->wglGetExtensionsStringEXTFn
138 #define wglGetPbufferDCARB ::gfx::g_current_wgl_context->wglGetPbufferDCARBFn
139 #define wglMakeCurrent ::gfx::g_current_wgl_context->wglMakeCurrentFn
140 #define wglQueryPbufferARB ::gfx::g_current_wgl_context->wglQueryPbufferARBFn
141 #define wglReleasePbufferDCARB \
142 ::gfx::g_current_wgl_context->wglReleasePbufferDCARBFn
143 #define wglShareLists ::gfx::g_current_wgl_context->wglShareListsFn
144 #define wglSwapIntervalEXT ::gfx::g_current_wgl_context->wglSwapIntervalEXTFn
145 #define wglSwapLayerBuffers ::gfx::g_current_wgl_context->wglSwapLayerBuffersFn
147 #endif // UI_GFX_GL_GL_BINDINGS_AUTOGEN_WGL_H_