From: curt Date: Fri, 22 Oct 1999 12:34:06 +0000 (+0000) Subject: Set glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ; when done drawing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cb0da2ca5e60d4f80b9561fe6c7dae85c51ba418;p=simgear.git Set glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ; when done drawing the Sun so that the cloud texture alpha blending will work correctly. --- diff --git a/simgear/ephemeris/star.cxx b/simgear/ephemeris/star.cxx index 0e6e9ad4..51bc3883 100644 --- a/simgear/ephemeris/star.cxx +++ b/simgear/ephemeris/star.cxx @@ -235,8 +235,8 @@ void Star::newImage(void) xglTranslatef(0,60000,0); if (current_options.get_textures()) { - glEnable(GL_TEXTURE_2D); // TEXTURE ENABLED - glEnable(GL_BLEND); // BLEND ENABLED + glEnable(GL_TEXTURE_2D); // TEXTURE ENABLED + glEnable(GL_BLEND); // BLEND ENABLED glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); @@ -254,8 +254,8 @@ void Star::newImage(void) } glPopMatrix(); - glDisable(GL_LIGHTING); //LIGHTING DISABLED - glDisable(GL_BLEND); //BLEND DISABLED + glDisable(GL_LIGHTING); // LIGHTING DISABLED + glDisable(GL_BLEND); // BLEND DISABLED glPushMatrix(); { xglRotatef(((RAD_TO_DEG * rightAscension)- 90.0), 0.0, 0.0, 1.0); @@ -265,7 +265,8 @@ void Star::newImage(void) gluSphere( SunObject, sun_size, 10, 10 ); } glPopMatrix(); - glDisable(GL_TEXTURE_2D); // TEXTURE DISABLED - glDisable(GL_BLEND); // BLEND DISABLED + glDisable(GL_TEXTURE_2D); // TEXTURE DISABLED + glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ; + glDisable(GL_BLEND); // BLEND DISABLED } }