diff options
author | Stijn Buys <ingar@osirion.org> | 2007-10-21 15:16:27 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2007-10-21 15:16:27 +0000 |
commit | 783545505aa51e4f908932fffb1f8362ad898d44 (patch) | |
tree | 84bb8738254d65057dd34f173a708ea0f3ef2fc3 /src/client/video.cc | |
parent | f936192f3689e58f9c72e19dd6f736f6b2449906 (diff) |
Fixed camera
Added alpha blending to background
Diffstat (limited to 'src/client/video.cc')
-rw-r--r-- | src/client/video.cc | 7 |
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; |