tryin' ta fix the linux thingy

master
Allen Webster 2020-02-19 22:38:18 -08:00
parent 48d80f57eb
commit ac0bd78485
2 changed files with 6 additions and 16 deletions

View File

@ -732,10 +732,10 @@ glx_create_context(GLXFBConfig fb_config){
ctx = glXCreateNewContext(linuxvars.dpy, fb_config, GLX_RGBA_TYPE, 0, True); ctx = glXCreateNewContext(linuxvars.dpy, fb_config, GLX_RGBA_TYPE, 0, True);
} else { } else {
static const int context_attribs[] = { static const int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 2, GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 1, GLX_CONTEXT_MINOR_VERSION_ARB, 2,
GLX_CONTEXT_PROFILE_MASK_ARB , GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, 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, GLX_CONTEXT_FLAGS_ARB , GLX_CONTEXT_DEBUG_BIT_ARB,
#endif #endif
None None

View File

@ -1343,9 +1343,9 @@ win32_gl_create_window(HWND *wnd_out, HGLRC *context_out, DWORD style, RECT rect
// NOTE(allen): Load wgl extensions // NOTE(allen): Load wgl extensions
#define LoadWGL(f,l) Stmnt((f) = (f##_Function*)wglGetProcAddress(#f); \ #define LoadWGL(f,l) Stmnt((f) = (f##_Function*)wglGetProcAddress(#f); \
(l) = (l) && win32_wgl_good((Void_Func*)(f));) (l) = (l) && win32_wgl_good((Void_Func*)(f));)
b32 load_success = true; b32 load_success = true;
LoadWGL(wglCreateContextAttribsARB, load_success); LoadWGL(wglCreateContextAttribsARB, load_success);
LoadWGL(wglChoosePixelFormatARB, load_success); LoadWGL(wglChoosePixelFormatARB, load_success);
LoadWGL(wglGetExtensionsStringEXT, 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; goto fail_window_init;
} }
#if 1
i32 context_attrib_list[] = { i32 context_attrib_list[] = {
/*0*/WGL_CONTEXT_MAJOR_VERSION_ARB, 3, /*0*/WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
/*2*/WGL_CONTEXT_MINOR_VERSION_ARB, 2, /*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, /*6*/WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
/*8*/0 /*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); HGLRC context = wglCreateContextAttribsARB(dc, 0, context_attrib_list);
if (context == 0){ if (context == 0){