From ac0bd78485b602aa78f5b1d4d91f22bb1591ff12 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Wed, 19 Feb 2020 22:38:18 -0800 Subject: [PATCH] tryin' ta fix the linux thingy --- platform_linux/linux_4ed.cpp | 6 +++--- platform_win32/win32_4ed.cpp | 16 +++------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/platform_linux/linux_4ed.cpp b/platform_linux/linux_4ed.cpp index 180c5bd7..fea3b1f7 100644 --- a/platform_linux/linux_4ed.cpp +++ b/platform_linux/linux_4ed.cpp @@ -732,10 +732,10 @@ glx_create_context(GLXFBConfig fb_config){ ctx = glXCreateNewContext(linuxvars.dpy, fb_config, GLX_RGBA_TYPE, 0, True); } else { static const int context_attribs[] = { - GLX_CONTEXT_MAJOR_VERSION_ARB, 2, - GLX_CONTEXT_MINOR_VERSION_ARB, 1, + GLX_CONTEXT_MAJOR_VERSION_ARB, 3, + GLX_CONTEXT_MINOR_VERSION_ARB, 2, GLX_CONTEXT_PROFILE_MASK_ARB , GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, -#if defined(FRED_INTERNAL) +#if GL_DEBUG_MODE GLX_CONTEXT_FLAGS_ARB , GLX_CONTEXT_DEBUG_BIT_ARB, #endif None diff --git a/platform_win32/win32_4ed.cpp b/platform_win32/win32_4ed.cpp index cccda51a..423de917 100644 --- a/platform_win32/win32_4ed.cpp +++ b/platform_win32/win32_4ed.cpp @@ -1343,9 +1343,9 @@ win32_gl_create_window(HWND *wnd_out, HGLRC *context_out, DWORD style, RECT rect // NOTE(allen): Load wgl extensions #define LoadWGL(f,l) Stmnt((f) = (f##_Function*)wglGetProcAddress(#f); \ -(l) = (l) && win32_wgl_good((Void_Func*)(f));) - - b32 load_success = true; + (l) = (l) && win32_wgl_good((Void_Func*)(f));) + + b32 load_success = true; LoadWGL(wglCreateContextAttribsARB, load_success); LoadWGL(wglChoosePixelFormatARB, load_success); LoadWGL(wglGetExtensionsStringEXT, load_success); @@ -1443,7 +1443,6 @@ win32_gl_create_window(HWND *wnd_out, HGLRC *context_out, DWORD style, RECT rect goto fail_window_init; } -#if 1 i32 context_attrib_list[] = { /*0*/WGL_CONTEXT_MAJOR_VERSION_ARB, 3, /*2*/WGL_CONTEXT_MINOR_VERSION_ARB, 2, @@ -1455,15 +1454,6 @@ win32_gl_create_window(HWND *wnd_out, HGLRC *context_out, DWORD style, RECT rect /*6*/WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, /*8*/0 }; -#else - i32 context_attrib_list[] = { - WGL_CONTEXT_MAJOR_VERSION_ARB, 2, - WGL_CONTEXT_MINOR_VERSION_ARB, 1, - WGL_CONTEXT_FLAGS_ARB, 0, - WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, - 0 - }; -#endif HGLRC context = wglCreateContextAttribsARB(dc, 0, context_attrib_list); if (context == 0){