#include <simgear/compiler.h>
+#include <simgear/debug/logstream.hxx>
#include <stdio.h>
#include STL_IOSTREAM
#include "stars.hxx"
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
-SG_USING_STD(cout);
-SG_USING_STD(endl);
-#endif
-
// Set up star rendering call backs
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 );
glPopAttrib();
- // glEnable( GL_DEPTH_TEST );
- // glEnable( GL_FOG );
-
return true;
}
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();
stars_transform->addKid( stars_obj );
- cout << "stars = " << stars_transform << endl;
+ SG_LOG( SG_EVENT, SG_INFO, "stars = " << stars_transform);
return stars_transform;
}