From 8800cca7ccd8265bd32e55c40db78c3eb72b703d Mon Sep 17 00:00:00 2001 From: Nathan Fulton Date: Tue, 13 Sep 2016 14:16:54 -0400 Subject: [PATCH] Set appropriate GL attributes --- game/sdl/display.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/game/sdl/display.cpp b/game/sdl/display.cpp index 5fff45e..e52e845 100644 --- a/game/sdl/display.cpp +++ b/game/sdl/display.cpp @@ -93,6 +93,13 @@ bool Display::Init() m_cx = props.cxWidth; m_cy = props.cyHeight; m_density = props.density; + + // Set appropriate GL attributes + SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); // Create window if ((m_window = SDL_CreateWindow("Hostile Takeover", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, m_cx, m_cy, videoflags)) == NULL) {