Wise&mystical  1.0
Project about Europe
Loading...
Searching...
No Matches
wgl_context.h
Go to the documentation of this file.
1//========================================================================
2// GLFW 3.4 WGL - www.glfw.org
3//------------------------------------------------------------------------
4// Copyright (c) 2002-2006 Marcus Geelnard
5// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
6//
7// This software is provided 'as-is', without any express or implied
8// warranty. In no event will the authors be held liable for any damages
9// arising from the use of this software.
10//
11// Permission is granted to anyone to use this software for any purpose,
12// including commercial applications, and to alter it and redistribute it
13// freely, subject to the following restrictions:
14//
15// 1. The origin of this software must not be misrepresented; you must not
16// claim that you wrote the original software. If you use this software
17// in a product, an acknowledgment in the product documentation would
18// be appreciated but is not required.
19//
20// 2. Altered source versions must be plainly marked as such, and must not
21// be misrepresented as being the original software.
22//
23// 3. This notice may not be removed or altered from any source
24// distribution.
25//
26//========================================================================
27
28#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
29#define WGL_SUPPORT_OPENGL_ARB 0x2010
30#define WGL_DRAW_TO_WINDOW_ARB 0x2001
31#define WGL_PIXEL_TYPE_ARB 0x2013
32#define WGL_TYPE_RGBA_ARB 0x202b
33#define WGL_ACCELERATION_ARB 0x2003
34#define WGL_NO_ACCELERATION_ARB 0x2025
35#define WGL_RED_BITS_ARB 0x2015
36#define WGL_RED_SHIFT_ARB 0x2016
37#define WGL_GREEN_BITS_ARB 0x2017
38#define WGL_GREEN_SHIFT_ARB 0x2018
39#define WGL_BLUE_BITS_ARB 0x2019
40#define WGL_BLUE_SHIFT_ARB 0x201a
41#define WGL_ALPHA_BITS_ARB 0x201b
42#define WGL_ALPHA_SHIFT_ARB 0x201c
43#define WGL_ACCUM_BITS_ARB 0x201d
44#define WGL_ACCUM_RED_BITS_ARB 0x201e
45#define WGL_ACCUM_GREEN_BITS_ARB 0x201f
46#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
47#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
48#define WGL_DEPTH_BITS_ARB 0x2022
49#define WGL_STENCIL_BITS_ARB 0x2023
50#define WGL_AUX_BUFFERS_ARB 0x2024
51#define WGL_STEREO_ARB 0x2012
52#define WGL_DOUBLE_BUFFER_ARB 0x2011
53#define WGL_SAMPLES_ARB 0x2042
54#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20a9
55#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
56#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
57#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
58#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
59#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
60#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
61#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
62#define WGL_CONTEXT_FLAGS_ARB 0x2094
63#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
64#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
65#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
66#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
67#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
68#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
69#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
70#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
71#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3
72#define WGL_COLORSPACE_EXT 0x309d
73#define WGL_COLORSPACE_SRGB_EXT 0x3089
74
75#define ERROR_INVALID_VERSION_ARB 0x2095
76#define ERROR_INVALID_PROFILE_ARB 0x2096
77#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
78
79// WGL extension pointer typedefs
80typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int);
81typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*);
82typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);
83typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC);
84typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*);
85#define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT
86#define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB
87#define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT
88#define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB
89#define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB
90
91// opengl32.dll function pointer typedefs
92typedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC);
93typedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC);
94typedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR);
95typedef HDC (WINAPI * PFN_wglGetCurrentDC)(void);
96typedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void);
97typedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC);
98typedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC);
99#define wglCreateContext _glfw.wgl.CreateContext
100#define wglDeleteContext _glfw.wgl.DeleteContext
101#define wglGetProcAddress _glfw.wgl.GetProcAddress
102#define wglGetCurrentDC _glfw.wgl.GetCurrentDC
103#define wglGetCurrentContext _glfw.wgl.GetCurrentContext
104#define wglMakeCurrent _glfw.wgl.MakeCurrent
105#define wglShareLists _glfw.wgl.ShareLists
106
107#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextWGL wgl
108#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl
109
110
111// WGL-specific per-context data
112//
113typedef struct _GLFWcontextWGL
114{
115 HDC dc;
116 HGLRC handle;
118
120
121// WGL-specific global data
122//
123typedef struct _GLFWlibraryWGL
124{
125 HINSTANCE instance;
133
151
153
154
156void _glfwTerminateWGL(void);
158 const _GLFWctxconfig* ctxconfig,
159 const _GLFWfbconfig* fbconfig);
160
int GLFWbool
Definition: internal.h:61
GLFWbool ARB_context_flush_control
Definition: wgl_context.h:150
HINSTANCE instance
Definition: wgl_context.h:125
PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT
Definition: wgl_context.h:136
PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB
Definition: wgl_context.h:135
PFN_wglCreateContext CreateContext
Definition: wgl_context.h:126
PFN_wglGetCurrentContext GetCurrentContext
Definition: wgl_context.h:130
GLFWbool EXT_swap_control
Definition: wgl_context.h:139
GLFWbool ARB_create_context_robustness
Definition: wgl_context.h:148
PFN_wglGetProcAddress GetProcAddress
Definition: wgl_context.h:128
PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB
Definition: wgl_context.h:137
PFN_wglDeleteContext DeleteContext
Definition: wgl_context.h:127
GLFWbool ARB_multisample
Definition: wgl_context.h:141
GLFWbool ARB_create_context_profile
Definition: wgl_context.h:146
GLFWbool EXT_colorspace
Definition: wgl_context.h:140
PFN_wglShareLists ShareLists
Definition: wgl_context.h:132
GLFWbool ARB_pixel_format
Definition: wgl_context.h:144
GLFWbool ARB_framebuffer_sRGB
Definition: wgl_context.h:142
PFN_wglMakeCurrent MakeCurrent
Definition: wgl_context.h:131
GLFWbool ARB_create_context
Definition: wgl_context.h:145
PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB
Definition: wgl_context.h:138
GLFWbool ARB_create_context_no_error
Definition: wgl_context.h:149
GLFWbool EXT_create_context_es2_profile
Definition: wgl_context.h:147
GLFWbool EXT_framebuffer_sRGB
Definition: wgl_context.h:143
PFN_wglGetCurrentDC GetCurrentDC
Definition: wgl_context.h:129
PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT
Definition: wgl_context.h:134
BOOL(WINAPI * PFN_wglMakeCurrent)(HDC, HGLRC)
Definition: wgl_context.h:97
BOOL(WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC, int, int, UINT, const int *, int *)
Definition: wgl_context.h:81
GLFWbool _glfwCreateContextWGL(_GLFWwindow *window, const _GLFWctxconfig *ctxconfig, const _GLFWfbconfig *fbconfig)
Definition: wgl_context.c:545
BOOL(WINAPI * PFN_wglShareLists)(HGLRC, HGLRC)
Definition: wgl_context.h:98
void _glfwTerminateWGL(void)
Definition: wgl_context.c:530
const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC)
Definition: wgl_context.h:83
BOOL(WINAPI * PFN_wglDeleteContext)(HGLRC)
Definition: wgl_context.h:93
BOOL(WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int)
Definition: wgl_context.h:80
const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void)
Definition: wgl_context.h:82
HGLRC(WINAPI * PFN_wglGetCurrentContext)(void)
Definition: wgl_context.h:96
HDC(WINAPI * PFN_wglGetCurrentDC)(void)
Definition: wgl_context.h:95
GLFWbool _glfwInitWGL(void)
Definition: wgl_context.c:410
HGLRC(WINAPI * PFN_wglCreateContext)(HDC)
Definition: wgl_context.h:92
HGLRC(WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int *)
Definition: wgl_context.h:84
PROC(WINAPI * PFN_wglGetProcAddress)(LPCSTR)
Definition: wgl_context.h:94