]> git.mxchange.org Git - simgear.git/commitdiff
Set glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ; when done drawing
authorcurt <curt>
Fri, 22 Oct 1999 12:34:06 +0000 (12:34 +0000)
committercurt <curt>
Fri, 22 Oct 1999 12:34:06 +0000 (12:34 +0000)
the Sun so that the cloud texture alpha blending will work correctly.

simgear/ephemeris/star.cxx

index 0e6e9ad41e8af9d334cda98dd302102a1ecd3905..51bc38832072913cbbb05c17e3a4645f708fd3b9 100644 (file)
@@ -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  
   }
 }