]> git.mxchange.org Git - flightgear.git/blobdiff - src/Objects/materialmgr.cxx
Moving towards increased dependence on ssg.
[flightgear.git] / src / Objects / materialmgr.cxx
index ece3f4d65763de2d17ab7a1c045d67ef4cb42f74..30495b8f2a831452171fa987e1bb45887a4c5980 100644 (file)
@@ -76,6 +76,10 @@ fgMATERIAL_MGR::fgMATERIAL_MGR ( void ) {
 void
 FGMaterialSlot::render_fragments()
 {
+    FG_LOG( FG_GENERAL, FG_ALERT, 
+           "FGMaterialSlot::render_fragments() is depricated ... " <<
+           "we shouldn't be here!" );
+
     int tris_rendered = current_view.get_tris_rendered();
 
     // cout << "rendering " + texture_name + " = " << list_size << "\n";
@@ -117,7 +121,7 @@ FGMaterialSlot::render_fragments()
 
        // Woohoo!!!  We finally get to draw something!
        // printf("  display_list = %d\n", frag_ptr->display_list);
-       xglCallList( frag_ptr->display_list );
+       // xglCallList( frag_ptr->display_list );
     }
 
     current_view.set_tris_rendered( tris_rendered );
@@ -135,12 +139,18 @@ fgMATERIAL_MGR::load_lib ( void )
     mpath.append( "materials" );
 
     fg_gzifstream in( mpath.str() );
-    if ( ! in ) {
+    if ( ! in.is_open() ) {
        FG_LOG( FG_GENERAL, FG_ALERT, "Cannot open file: " << mpath.str() );
        exit(-1);
     }
 
+#ifndef __MWERKS__
     while ( ! in.eof() ) {
+#else
+    char c = '\0';
+    while ( in.get(c) && c != '\0' ) {
+       in.putback(c);
+#endif
         // printf("%s", line);
 
        // strip leading white space and comments