]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/stars.cxx
Update the SoundSample api so we can request that a copy of the sample be
[simgear.git] / simgear / scene / sky / stars.cxx
index 55602b2fb258cb2bce263c507d192a2b63018f6b..47c7f8f1b67e4e08e1b3b566f716ca73460a3a4a 100644 (file)
@@ -26,6 +26,7 @@
 
 
 #include <simgear/compiler.h>
+#include <simgear/debug/logstream.hxx>
 
 #include <stdio.h>
 #include STL_IOSTREAM
@@ -35,9 +36,6 @@
 
 #include "stars.hxx"
 
-SG_USING_STD(cout);
-SG_USING_STD(endl);
-
 
 // Set up star rendering call backs
 static int sgStarPreDraw( ssgEntity *e ) {
@@ -47,7 +45,7 @@ static int sgStarPreDraw( ssgEntity *e ) {
     ssgLeaf *f = (ssgLeaf *)e;
     if ( f -> hasState () ) f->getState()->apply() ;
 
-    glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_FOG_BIT );
+    glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_FOG_BIT | GL_COLOR_BUFFER_BIT );
 
     glDisable( GL_DEPTH_TEST );
     glDisable( GL_FOG );
@@ -62,9 +60,6 @@ static int sgStarPostDraw( ssgEntity *e ) {
 
     glPopAttrib();
 
-    // glEnable( GL_DEPTH_TEST );
-    // glEnable( GL_FOG );
-
     return true;
 }
 
@@ -85,9 +80,9 @@ SGStars::~SGStars( void ) {
 ssgBranch * SGStars::build( int num, sgdVec3 *star_data, double star_dist ) {
     sgVec4 color;
 
-    if ( star_data == NULL ) {
-        cout << "WARNING: null star data passed to SGStars::build()" << endl;
-    }
+    if ( star_data == NULL )
+        SG_LOG( SG_EVENT, SG_WARN, "null star data passed to SGStars::build()");
+
 
     // set up the orb state
     state = new ssgSimpleState();
@@ -137,7 +132,7 @@ ssgBranch * SGStars::build( int num, sgdVec3 *star_data, double star_dist ) {
 
     stars_transform->addKid( stars_obj );
 
-    cout << "stars = " << stars_transform << endl;
+    SG_LOG( SG_EVENT, SG_INFO, "stars = " << stars_transform);
 
     return stars_transform;
 }