Erik, Using glGet() is considered a no-no in real time applications. That stalls out the pipeline and forces all pending operations to flush before the card can return with the correct answer. We might be able to get away with it in limited quantities, but this can *quickly* turn into a performance killer (probably varies signifantly from platform to platform.)
Please consider an alternative approach! Thanks, Curt. Erik Hofman writes: > Update of /var/cvs/SimGear-0.3/SimGear/simgear/scene/sky > In directory baron:/tmp/cvs-serv29366 > > Modified Files: > oursun.cxx > Log Message: > Add support for NVidia cards with a broken OpenGL implementation > > Index: oursun.cxx > =================================================================== > RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/scene/sky/oursun.cxx,v > retrieving revision 1.9 > retrieving revision 1.10 > diff -C2 -r1.9 -r1.10 > *** oursun.cxx 14 Aug 2003 12:32:58 -0000 1.9 > --- oursun.cxx 15 Aug 2003 17:19:22 -0000 1.10 > *************** > *** 50,53 **** > --- 50,61 ---- > #include "oursun.hxx" > > + // FIXME: This should not be needed, but at this time (08/15/2003) > + // certain NVidia drivers don't seem to implement > + // fgPushAttrib(FG_FOG_BIT) properly. The result is that > + // there is not fog when looking at the sun. > + #ifndef SG_PROPER_FOG_SUPPORT > + static float curFogDensity; > + #endif > + > > // Set up sun rendering call backs > *************** > *** 88,91 **** > --- 96,103 ---- > if ( f -> hasState () ) f->getState()->apply() ; > > + #ifndef SG_PROPER_FOG_SUPPORT > + glGetFloatv( GL_FOG_DENSITY, &curFogDensity ); > + #endif > + > glPushAttrib( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_FOG_BIT ); > // cout << "push error = " << glGetError() << endl; > *************** > *** 106,109 **** > --- 118,125 ---- > // cout << "pop error = " << glGetError() << endl; > > + #ifndef SG_PROPER_FOG_SUPPORT > + glFogf( GL_FOG_DENSITY, curFogDensity ); > + #endif > + > // glEnable( GL_DEPTH_TEST ); > // glEnable( GL_FOG ); > > > _______________________________________________ > Simgear-cvslogs mailing list > [EMAIL PROTECTED] > http://mail.flightgear.org/mailman/listinfo/simgear-cvslogs -- Curtis Olson IVLab / HumanFIRST Program FlightGear Project Twin Cities curt 'at' me.umn.edu curt 'at' flightgear.org Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel