1
0
Fork 0

Tweaks to fix problems with moon rendering introduced with ssg.

This commit is contained in:
curt 1999-08-15 15:35:07 +00:00
parent eae7892a43
commit bbced46d9f
2 changed files with 7 additions and 7 deletions

View file

@ -256,10 +256,6 @@ static void fgRenderFrame( void ) {
// set the sun position // set the sun position
xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec ); xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
sgVec3 sunpos;
sgSetVec3( sunpos, l->sun_vec[0], l->sun_vec[1], l->sun_vec[2] );
ssgGetLight( 0 ) -> setPosition( sunpos );
clear_mask = GL_DEPTH_BUFFER_BIT; clear_mask = GL_DEPTH_BUFFER_BIT;
if ( current_options.get_wireframe() ) { if ( current_options.get_wireframe() ) {
clear_mask |= GL_COLOR_BUFFER_BIT; clear_mask |= GL_COLOR_BUFFER_BIT;
@ -317,7 +313,9 @@ static void fgRenderFrame( void ) {
// draw stars and planets // draw stars and planets
fgStarsRender(); fgStarsRender();
xglDisable( GL_COLOR_MATERIAL ); // just to make sure ...
xglEnable( GL_CULL_FACE ); // for moon xglEnable( GL_CULL_FACE ); // for moon
xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
//xglEnable(GL_DEPTH_TEST); //xglEnable(GL_DEPTH_TEST);
SolarSystem::theSolarSystem->draw(); SolarSystem::theSolarSystem->draw();
@ -358,9 +356,9 @@ static void fgRenderFrame( void ) {
// xglMaterialfv (GL_FRONT, GL_DIFFUSE, white); // xglMaterialfv (GL_FRONT, GL_DIFFUSE, white);
} }
// global_tile_mgr.render(); sgVec3 sunpos;
sgSetVec3( sunpos, l->sun_vec[0], l->sun_vec[1], l->sun_vec[2] );
// ssg test ssgGetLight( 0 ) -> setPosition( sunpos );
// xglMatrixMode( GL_PROJECTION ); // xglMatrixMode( GL_PROJECTION );
// xglLoadIdentity(); // xglLoadIdentity();

View file

@ -94,6 +94,8 @@ int FGTileMgr::init( void ) {
material_mgr.load_lib(); material_mgr.load_lib();
} }
global_tile_cache.init();
state = Inited; state = Inited;
return 1; return 1;