Mercurial > hg > Members > kono > Cerium
changeset 960:6945fb810ce3
success alpha blending neatly
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 04 Aug 2010 19:08:33 +0900 |
parents | 66cddab9fa76 |
children | 02f1a707ee82 |
files | Renderer/Engine/viewerGL.cc |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
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);