# include <config.h>
#endif
+#include <simgear/compiler.h>
+
#include <stdio.h>
-#include <iostream>
+#include STL_IOSTREAM
#include <plib/sg.h>
#include <plib/ssg.h>
+#include <compiler.h>
+
#include "stars.hxx"
-#ifdef _MSC_VER
+#if !defined (FG_HAVE_NATIVE_SGI_COMPILERS)
FG_USING_STD(cout);
FG_USING_STD(endl);
-#endif
+#endif
// Set up star rendering call backs
static int sgStarPreDraw( ssgEntity *e ) {
/* cout << endl << "Star pre draw" << endl << "----------------"
<< endl << endl; */
+
+ ssgLeaf *f = (ssgLeaf *)e;
+ if ( f -> hasState () ) f->getState()->apply() ;
+
+ glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_FOG_BIT );
+
glDisable( GL_DEPTH_TEST );
glDisable( GL_FOG );
- glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
+ // glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
return true;
}
static int sgStarPostDraw( ssgEntity *e ) {
/* cout << endl << "Star post draw" << endl << "----------------"
<< endl << endl; */
- glEnable( GL_DEPTH_TEST );
- glEnable( GL_FOG );
+
+ glPopAttrib();
+
+ // glEnable( GL_DEPTH_TEST );
+ // glEnable( GL_FOG );
return true;
}