X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=gtest_sdl_main.cpp;h=f4a4d0540bc0cf5efc8c23d0f5491365f7c8c95b;hp=be8bdd4d372054f68c81cf28968dcb40a88f8c4e;hb=b4ec29a251e118f463ce940ffaf0945188bf6894;hpb=b9da5758dedda56a1e2616647ebae129edb0c2db diff --git a/gtest_sdl_main.cpp b/gtest_sdl_main.cpp index be8bdd4..f4a4d05 100644 --- a/gtest_sdl_main.cpp +++ b/gtest_sdl_main.cpp @@ -21,15 +21,10 @@ int main(int argc, char **argv) { SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 0); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); - // You can uncomment this if you want to try a core context. - // For Mesa, you can get the same effect by doing - // - // export MESA_GL_VERSION_OVERRIDE=3.1FC - // - // before running tests. -// SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); -// SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); -// SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); + // Use a core context, because Mesa only allows certain OpenGL versions in core. + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); // See also init.cpp for how to enable debugging. // SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);