fgfs-win32-bin:
(cd $(HOME); \
- zip -r fgfs-win32-bin-$(VERSION).zip FlightGear/bin )
+ zip -r fgfs-win32-bin-$(VERSION).zip FlightGear/runfgfs.bat \
+ FlightGear/bin/Win32 )
# make the win32-libs distribution (depricated)
win32-libs:
}
}
+static void printMat(const sgVec4 *mat, char *name="")
+{
+ int i;
+ cout << name << endl;
+ for(i=0; i<4; i++) {
+ cout <<" "<<mat[i][0]<<" "<<mat[i][1]<<" "<<mat[i][2]<<" "<<mat[i][3]<<endl;
+ }
+ cout << endl;
+}
// Initialize view parameters
void fgInitView() {
globals->get_aircraft_model()->update(0);
// run update for current view so that data is current...
globals->get_viewmgr()->update(0);
+
+ printMat(globals->get_current_view()->get_VIEW(),"VIEW");
+ printMat(globals->get_current_view()->get_UP(),"UP");
+ // printMat(globals->get_current_view()->get_LOCAL(),"LOCAL");
+
}
////////////////////////////////////////////////////////////////////
// Initialize the 3D cloud subsystem.
////////////////////////////////////////////////////////////////////
-
if ( fgGetBool("/sim/rendering/clouds3d") ) {
SGPath cloud_path(globals->get_fg_root());
cloud_path.append("large.sky");
+ SG_LOG(SG_GENERAL, SG_INFO, "Loading CLOUDS3d from: " << cloud_path.c_str());
if ( !sgCloud3d->Load( cloud_path.str() ) ) {
fgSetBool("/sim/rendering/clouds3d", false);
+ SG_LOG(SG_GENERAL, SG_INFO, "CLOUDS3d FAILED: ");
}
+ SG_LOG(SG_GENERAL, SG_INFO, "CLOUDS3d Loaded: ");
}
-
////////////////////////////////////////////////////////////////////
// Initialize vor/ndb/ils/fix list management and query systems
////////////////////////////////////////////////////////////////////
globals->get_model_mgr()->draw();
globals->get_aircraft_model()->draw();
-
- // need to do this here as hud_and_panel state is static to
- // main.cxx and HUD and Panel routines have to be called with
- // knowledge of the the TR struct < see gui.cxx::HighResDump()
- hud_and_panel->apply();
}
// calculate our current position in cartesian space
globals->get_scenery()->set_center( globals->get_scenery()->get_next_center() );
- // do it here. at init time the clouds are loaded BEFORE our position is known
- if ( fgGetBool("/sim/rendering/clouds3d") ) {
- if ( _bcloud_orig ) {
- // cloud center can be anywhere in fgfs coordinates, but the tile
- // cener is a good place as we'll have some visible when starting
- posit = globals->get_scenery()->get_center();
- sgClouds3d->Set_Cloud_Orig( _posit );
- _bcloud_orig = false;
- }
- sgClouds3d->Update( current__view->get_absolute_view_pos() );
- }
-
// update view port
fgReshape( fgGetInt("/sim/startup/xsize"),
fgGetInt("/sim/startup/ysize") );
}
glClear( clear_mask );
+ if ( fgGetBool("/sim/rendering/clouds3d") ) {
+ posit = globals->get_scenery()->get_center();
+ if ( _bcloud_orig ) {
+ sgClouds3d->Set_Cloud_Orig( _posit );
+ _bcloud_orig = false;
+ }
+ sgClouds3d->Update( current__view->get_absolute_view_pos() );
+ }
+
// Tell GL we are switching to model view parameters
// I really should create a derived ssg node or use a call
globals->get_model_mgr()->draw();
globals->get_aircraft_model()->draw();
- // draw the 3D clouds
- if ( fgGetBool("/sim/rendering/clouds3d") ) {
- //glPushAttrib(GL_ALL_ATTRIB_BITS);
- // transform the current view matrix with camera offset position
- sgClouds3d->Draw( (sgVec4 *)current__view->get_VIEW() );
- //sgClouds3d->Draw();
- //glPopAttrib();
- }
-
// display HUD && Panel
glDisable( GL_FOG );
glDisable( GL_DEPTH_TEST );
puDisplay();
// glDisable ( GL_BLEND ) ;
- // glEnable( GL_FOG );
+ if ( fgGetBool("/sim/rendering/clouds3d") ) {
+ // cout << "drawing new clouds" << endl;
+ // set the opengl state to known default values
+ // default_state->force();
+ sgClouds3d->Draw((sgVec4 *)current__view->get_VIEW());
+ }
+
+ glEnable( GL_DEPTH_TEST );
+ glEnable( GL_FOG );
globals->get_logger()->update(delta_time_sec);
}
emission[2] = props->getDoubleValue("emissive/b", 0.0);
emission[3] = props->getDoubleValue("emissive/a", 0.0);
+ shininess = props->getDoubleValue("shininess", 0.0);
+
vector<SGPropertyNode_ptr> object_group_nodes =
((SGPropertyNode *)props)->getChildren("object-group");
for (unsigned int i = 0; i < object_group_nodes.size(); i++)
light_coverage = 0.0;
texture_loaded = false;
refcount = 0;
+ shininess = 0.0;
for (int i = 0; i < 4; i++)
ambient[i] = diffuse[i] = specular[i] = emission[i] = 0.0;
}
textured->setMaterial ( GL_SPECULAR,
specular[0], specular[1],
specular[2], specular[3] ) ;
- textured->setShininess( 75.0 );
textured->setMaterial ( GL_EMISSION,
emission[0], emission[1],
emission[2], emission[3] ) ;
+ textured->setShininess ( shininess );
#endif
// Set up the coloured state
nontextured->setMaterial ( GL_EMISSION,
emission[0], emission[1],
emission[2], emission[3] ) ;
+ nontextured->setShininess ( shininess );
state->setStep( 0, textured ); // textured
state->setStep( 1, nontextured ); // untextured
nontextured->setMaterial ( GL_EMISSION,
emission[0], emission[1],
emission[2], emission[3] ) ;
+ nontextured->setShininess ( shininess );
state->setStep( 0, textured ); // textured
state->setStep( 1, nontextured ); // untextured
// material properties
sgVec4 ambient, diffuse, specular, emission;
+ double shininess;
// true if texture loading deferred, and not yet loaded
bool texture_loaded;