Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/video.cc')
-rw-r--r--src/client/video.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/video.cc b/src/client/video.cc
index eb4297e..2697585 100644
--- a/src/client/video.cc
+++ b/src/client/video.cc
@@ -33,9 +33,13 @@ void reset()
gl::frontface(GL_CCW );
gl::enable( GL_CULL_FACE );
- gl::depthmask(GL_TRUE); // Depth buffer writing
+ // Depth buffer writing
+ gl::depthmask(GL_TRUE);
gl::enable(GL_DEPTH_TEST);
+ // Alpha blending
+ gl::blendfunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
// Set the clear color
gl::clearcolor( 0, 0, 0, 0 );
@@ -73,6 +77,7 @@ void init()
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
+ SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 2);
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
flags = SDL_OPENGL | SDL_FULLSCREEN;