# HG changeset patch # User koba <koba@cr.ie.u-ryukyu.ac.jp> # Date 1280916513 -32400 # Node ID 418939c6837d99404753219c6989f698979beb9b # Parent f389d7fcc25cf6e7a4fdc48783557b7995015be3 success alpha blending neatly diff -r f389d7fcc25c -r 418939c6837d Renderer/Engine/viewerGL.cc --- 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);