From 6ca5d469805b47b0e6bf8fc3b8765dd0d675d07d Mon Sep 17 00:00:00 2001 From: Robert Colton Date: Tue, 14 Jan 2020 10:28:52 -0500 Subject: [PATCH 1/2] Update WGL core test Attempt to create an actual core context using WGL extension. --- test/wgl_core_and_exts.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/wgl_core_and_exts.c b/test/wgl_core_and_exts.c index 7d22acc9..4c81da77 100644 --- a/test/wgl_core_and_exts.c +++ b/test/wgl_core_and_exts.c @@ -43,6 +43,21 @@ test_function(HDC hdc) return 1; } + // Attempt to create core context if supported + if (epoxy_has_gl_extension("WGL_ARB_create_context")) { + // -- Define an array of Context Attributes + int attribs[] = { + WGL_CONTEXT_PROFILE_MASK_ARB,WGL_CONTEXT_CORE_PROFILE_BIT_ARB, + 0 + }; + + HGLRC corectx = wglCreateContextAttribsARB(hdc, 0, attribs); + wglMakeCurrent(NULL, NULL); + wglDeleteContext(ctx); + ctx = corectx; + wglMakeCurrent(hdc, ctx); + } + /* GL 1.0 APIs are available as symbols in opengl32.dll. */ glEnable(GL_LIGHTING); val = 0; From 11881f363c33e9478290a198ade60f3669ca183a Mon Sep 17 00:00:00 2001 From: Robert Colton Date: Tue, 21 Jul 2020 14:50:02 -0400 Subject: [PATCH 2/2] Update wgl_core_and_exts.c --- test/wgl_core_and_exts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/wgl_core_and_exts.c b/test/wgl_core_and_exts.c index 4c81da77..2912a661 100644 --- a/test/wgl_core_and_exts.c +++ b/test/wgl_core_and_exts.c @@ -44,7 +44,7 @@ test_function(HDC hdc) } // Attempt to create core context if supported - if (epoxy_has_gl_extension("WGL_ARB_create_context")) { + if (epoxy_has_wgl_extension(hdc, "WGL_ARB_create_context")) { // -- Define an array of Context Attributes int attribs[] = { WGL_CONTEXT_PROFILE_MASK_ARB,WGL_CONTEXT_CORE_PROFILE_BIT_ARB,