diff --git a/src/main.c b/src/main.c index bea2f84..d5be625 100644 --- a/src/main.c +++ b/src/main.c @@ -192,6 +192,7 @@ static bool initialize(void) { SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1); if (ctx.debug) SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG); diff --git a/src/rendering.c b/src/rendering.c index 973afa3..ec2fa6b 100644 --- a/src/rendering.c +++ b/src/rendering.c @@ -113,6 +113,7 @@ static void render_space(void) { glEnable(GL_DEPTH_TEST); glDepthMask(GL_TRUE); glDepthFunc(GL_LESS); + glDepthRange(0, 1); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_TEXTURE_2D); @@ -175,6 +176,7 @@ void render(void) { /* TODO: only do it when transition between spaces is needed */ glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + glFlush(); { glMatrixMode(GL_PROJECTION);