mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Win32: Use helper window to load WGL extensions
This removes window re-creation logic by performing the initial context creation on the helper window, simplifying both window and context creation and paving the way for attaching to existing window handles without compromising on context or framebuffer hint support.
This commit is contained in:
+3
-3
@@ -82,6 +82,7 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*)
|
||||
typedef HGLRC (WINAPI * WGLCREATECONTEXT_T)(HDC);
|
||||
typedef BOOL (WINAPI * WGLDELETECONTEXT_T)(HGLRC);
|
||||
typedef PROC (WINAPI * WGLGETPROCADDRESS_T)(LPCSTR);
|
||||
typedef HDC (WINAPI * WGLGETCURRENTDC_T)(void);
|
||||
typedef BOOL (WINAPI * WGLMAKECURRENT_T)(HDC,HGLRC);
|
||||
typedef BOOL (WINAPI * WGLSHARELISTS_T)(HGLRC,HGLRC);
|
||||
|
||||
@@ -89,6 +90,7 @@ typedef BOOL (WINAPI * WGLSHARELISTS_T)(HGLRC,HGLRC);
|
||||
#define wglCreateContext _glfw.wgl.CreateContext
|
||||
#define wglDeleteContext _glfw.wgl.DeleteContext
|
||||
#define wglGetProcAddress _glfw.wgl.GetProcAddress
|
||||
#define wglGetCurrentDC _glfw.wgl.GetCurrentDC
|
||||
#define wglMakeCurrent _glfw.wgl.MakeCurrent
|
||||
#define wglShareLists _glfw.wgl.ShareLists
|
||||
|
||||
@@ -118,6 +120,7 @@ typedef struct _GLFWlibraryWGL
|
||||
WGLCREATECONTEXT_T CreateContext;
|
||||
WGLDELETECONTEXT_T DeleteContext;
|
||||
WGLGETPROCADDRESS_T GetProcAddress;
|
||||
WGLGETCURRENTDC_T GetCurrentDC;
|
||||
WGLMAKECURRENT_T MakeCurrent;
|
||||
WGLSHARELISTS_T ShareLists;
|
||||
|
||||
@@ -147,8 +150,5 @@ void _glfwTerminateWGL(void);
|
||||
GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
|
||||
const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* fbconfig);
|
||||
int _glfwAnalyzeContextWGL(_GLFWwindow* window,
|
||||
const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* fbconfig);
|
||||
|
||||
#endif // _glfw3_wgl_context_h_
|
||||
|
||||
Reference in New Issue
Block a user