mirror of
https://github.com/spiffcode/hostile-takeover.git
synced 2026-06-03 15:34:59 -06:00
Set appropriate GL attributes
This commit is contained in:
parent
ed1d50c8ea
commit
8800cca7cc
@ -94,6 +94,13 @@ bool Display::Init()
|
|||||||
m_cy = props.cyHeight;
|
m_cy = props.cyHeight;
|
||||||
m_density = props.density;
|
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
|
// Create window
|
||||||
if ((m_window = SDL_CreateWindow("Hostile Takeover", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, m_cx, m_cy, videoflags)) == NULL) {
|
if ((m_window = SDL_CreateWindow("Hostile Takeover", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, m_cx, m_cy, videoflags)) == NULL) {
|
||||||
LOG() << "Couldn't create window: " << m_cx << "x" << m_cy << " \nError: " << SDL_GetError();
|
LOG() << "Couldn't create window: " << m_cx << "x" << m_cy << " \nError: " << SDL_GetError();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user