From c27844be9db4862d52b1d1e523d1113929a96d5d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 5 Sep 2023 12:24:45 +0300 Subject: [PATCH] Do not use wglext.h It does not exist in the Windows SDK. Instead add manual definitions for what we need. --- source/graphics/wgl/glcontext.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/graphics/wgl/glcontext.cpp b/source/graphics/wgl/glcontext.cpp index 5a13dc4..f04f664 100644 --- a/source/graphics/wgl/glcontext.cpp +++ b/source/graphics/wgl/glcontext.cpp @@ -2,13 +2,29 @@ #include #include #include -#include #include #include #include "window_private.h" using namespace std; +#ifndef WGL_ARB_create_context +using PFNWGLCREATECONTEXTATTRIBSARBPROC = HGLRC (WINAPI *)(HDC, HGLRC, const int *); +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 2 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#endif + +#ifndef WGL_ARB_create_context_profile +#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 1 +#endif + +#ifndef WGL_EXT_swap_control +using PFNWGLSWAPINTERVALEXTPROC = BOOL (WINAPI *)(int); +#endif + namespace { template -- 2.45.2