wgl_context.h
Go to the documentation of this file.
1 //========================================================================
2 // GLFW 3.1 WGL - www.glfw.org
3 //------------------------------------------------------------------------
4 // Copyright (c) 2002-2006 Marcus Geelnard
5 // Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.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 #ifndef _glfw3_wgl_context_h_
29 #define _glfw3_wgl_context_h_
30 
31 // This path may need to be changed if you build GLFW using your own setup
32 // We ship and use our own copy of wglext.h since GLFW uses fairly new
33 // extensions and not all operating systems come with an up-to-date version
34 #include "../deps/GL/wglext.h"
35 
36 // opengl32.dll function pointer typedefs
37 typedef HGLRC (WINAPI * WGLCREATECONTEXT_T)(HDC);
38 typedef BOOL (WINAPI * WGLDELETECONTEXT_T)(HGLRC);
39 typedef PROC (WINAPI * WGLGETPROCADDRESS_T)(LPCSTR);
40 typedef BOOL (WINAPI * WGLMAKECURRENT_T)(HDC,HGLRC);
41 typedef BOOL (WINAPI * WGLSHARELISTS_T)(HGLRC,HGLRC);
42 #define _glfw_wglCreateContext _glfw.wgl.opengl32.CreateContext
43 #define _glfw_wglDeleteContext _glfw.wgl.opengl32.DeleteContext
44 #define _glfw_wglGetProcAddress _glfw.wgl.opengl32.GetProcAddress
45 #define _glfw_wglMakeCurrent _glfw.wgl.opengl32.MakeCurrent
46 #define _glfw_wglShareLists _glfw.wgl.opengl32.ShareLists
47 
48 #define _GLFW_PLATFORM_FBCONFIG int wgl
49 #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextWGL wgl
50 #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl
51 
52 
53 // WGL-specific per-context data
54 //
55 typedef struct _GLFWcontextWGL
56 {
57  HDC dc; // Private GDI device context
58  HGLRC context; // Permanent rendering context
59  int interval;
60 
61  // WGL extensions (context specific)
62  PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT;
63  PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB;
66  PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB;
77 
79 
80 
81 // WGL-specific global data
82 //
83 typedef struct _GLFWlibraryWGL
84 {
85  struct {
86  HINSTANCE instance;
92  } opengl32;
93 
95 
96 
97 int _glfwInitContextAPI(void);
98 void _glfwTerminateContextAPI(void);
100  const _GLFWctxconfig* ctxconfig,
101  const _GLFWfbconfig* fbconfig);
102 void _glfwDestroyContext(_GLFWwindow* window);
103 int _glfwAnalyzeContext(const _GLFWwindow* window,
104  const _GLFWctxconfig* ctxconfig,
105  const _GLFWfbconfig* fbconfig);
106 
107 #endif // _glfw3_wgl_context_h_
PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB
Definition: wgl_context.h:65
PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB
Definition: wgl_context.h:66
GLboolean ARB_create_context_profile
Definition: wgl_context.h:73
WGLCREATECONTEXT_T CreateContext
Definition: wgl_context.h:87
GLboolean EXT_framebuffer_sRGB
Definition: wgl_context.h:70
int _glfwInitContextAPI(void)
Definition: wgl_context.c:273
GLboolean ARB_create_context_robustness
Definition: wgl_context.h:75
BOOL(WINAPI * WGLMAKECURRENT_T)(HDC, HGLRC)
Definition: wgl_context.h:40
PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT
Definition: wgl_context.h:62
int _glfwAnalyzeContext(const _GLFWwindow *window, const _GLFWctxconfig *ctxconfig, const _GLFWfbconfig *fbconfig)
Definition: wgl_context.c:497
GLboolean ARB_framebuffer_sRGB
Definition: wgl_context.h:69
typedef HGLRC(WINAPI *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC
void _glfwTerminateContextAPI(void)
Definition: wgl_context.c:312
WGLSHARELISTS_T ShareLists
Definition: wgl_context.h:91
PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT
Definition: wgl_context.h:64
HINSTANCE instance
Definition: wgl_context.h:86
typedef GLboolean(APIENTRYP PFNGLISQUERYPROC)(GLuint id)
GLboolean EXT_swap_control
Definition: wgl_context.h:67
struct _GLFWcontextWGL _GLFWcontextWGL
void _glfwDestroyContext(_GLFWwindow *window)
Definition: wgl_context.c:480
BOOL(WINAPI * WGLSHARELISTS_T)(HGLRC, HGLRC)
Definition: wgl_context.h:41
WGLGETPROCADDRESS_T GetProcAddress
Definition: wgl_context.h:89
typedef BOOL(WINAPI *PFNWGLSAVEBUFFERREGIONARBPROC)(HANDLE hRegion
GLboolean ARB_pixel_format
Definition: wgl_context.h:71
typedef HDC(WINAPI *PFNWGLGETCURRENTREADDCARBPROC)(void)
GLboolean ARB_multisample
Definition: wgl_context.h:68
int _glfwCreateContext(_GLFWwindow *window, const _GLFWctxconfig *ctxconfig, const _GLFWfbconfig *fbconfig)
Definition: wgl_context.c:329
PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB
Definition: wgl_context.h:63
HGLRC(WINAPI * WGLCREATECONTEXT_T)(HDC)
Definition: wgl_context.h:37
WGLDELETECONTEXT_T DeleteContext
Definition: wgl_context.h:88
struct _GLFWlibraryWGL _GLFWlibraryWGL
PROC(WINAPI * WGLGETPROCADDRESS_T)(LPCSTR)
Definition: wgl_context.h:39
BOOL(WINAPI * WGLDELETECONTEXT_T)(HGLRC)
Definition: wgl_context.h:38
const char *WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC(void)
Definition: wglext.h:375
Context configuration.
Definition: internal.h:185
Window and context structure.
Definition: internal.h:232
GLboolean ARB_create_context
Definition: wgl_context.h:72
Framebuffer configuration.
Definition: internal.h:207
const char *WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC(HDC hdc)
Definition: wglext.h:113
GLboolean ARB_context_flush_control
Definition: wgl_context.h:76
WGLMAKECURRENT_T MakeCurrent
Definition: wgl_context.h:90
GLboolean EXT_create_context_es2_profile
Definition: wgl_context.h:74


librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:18