Mercurial > hg > Game > Cerium
diff Renderer/Engine/viewerGL.cc @ 960:418939c6837d draft
success alpha blending neatly
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 04 Aug 2010 19:08:33 +0900 |
parents | f389d7fcc25c |
children | 92185a81e94b |
line wrap: on
line diff
--- a/Renderer/Engine/viewerGL.cc Wed Aug 04 18:02:04 2010 +0900 +++ b/Renderer/Engine/viewerGL.cc Wed Aug 04 19:08:33 2010 +0900 @@ -141,6 +141,9 @@ glLightfv(GL_LIGHT0, GL_SPECULAR, OPENGL_PARAM::lightSpecular); glLightfv(GL_LIGHT0, GL_POSITION, OPENGL_PARAM::lightPosition); + glEnable(GL_DEPTH_TEST); + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0); glDepthFunc(GL_LESS); glShadeModel(GL_SMOOTH); } @@ -339,6 +342,8 @@ void ViewerGL::run_finish() { + glDisable(GL_ALPHA_TEST); + glDisable(GL_DEPTH_TEST); glDisable(GL_BLEND); glDisable(GL_LIGHT0); glDisable(GL_LIGHTING);