1
0
Fork 0

re-order gl commands for better rgba texture support

This commit is contained in:
mfranz 2007-04-28 20:34:21 +00:00
parent 8f17140003
commit 4e1d4bf3e6

View file

@ -145,6 +145,7 @@ void fgSplashUpdate ( float alpha ) {
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING); glDisable(GL_LIGHTING);
glDisable(GL_CULL_FACE);
// draw the background // draw the background
FGColor c(0.0, 0.0, 0.0); FGColor c(0.0, 0.0, 0.0);
@ -157,6 +158,11 @@ void fgSplashUpdate ( float alpha ) {
glVertex2f(0.0, screen_height); glVertex2f(0.0, screen_height);
glEnd(); glEnd();
glEnable(GL_ALPHA_TEST);
glEnable(GL_BLEND);
glAlphaFunc(GL_GREATER, 0.1f);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// now draw the logo // now draw the logo
if (fgGetBool("/sim/startup/splash-screen", true)) { if (fgGetBool("/sim/startup/splash-screen", true)) {
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
@ -170,17 +176,10 @@ void fgSplashUpdate ( float alpha ) {
glTexCoord2f(1.0, 1.0); glVertex2f(xmax, ymax); glTexCoord2f(1.0, 1.0); glVertex2f(xmax, ymax);
glTexCoord2f(0.0, 1.0); glVertex2f(xmin, ymax); glTexCoord2f(0.0, 1.0); glVertex2f(xmin, ymax);
glEnd(); glEnd();
glDisable(GL_TEXTURE_2D);
} }
glDisable(GL_TEXTURE_2D);
if (progress_text && fgGetBool("/sim/startup/splash-progress", true)) { if (progress_text && fgGetBool("/sim/startup/splash-progress", true)) {
glEnable(GL_ALPHA_TEST);
glEnable(GL_BLEND);
glAlphaFunc(GL_GREATER, 0.1f);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_CULL_FACE);
puFont *fnt = globals->get_fontcache()->get(style->getNode("fonts/splash")); puFont *fnt = globals->get_fontcache()->get(style->getNode("fonts/splash"));
FGColor c(1.0, 0.9, 0.0); FGColor c(1.0, 0.9, 0.0);