]> git.mxchange.org Git - flightgear.git/commitdiff
Working on skydome ... some actual progress has been made. :-) Still
authorcurt <curt>
Wed, 1 Mar 2000 00:31:35 +0000 (00:31 +0000)
committercurt <curt>
Wed, 1 Mar 2000 00:31:35 +0000 (00:31 +0000)
something goofy with sunrise, sunset effects.

src/Main/fg_init.cxx
src/Main/keyboard.cxx
src/Main/main.cxx

index 75ddf1feb0f68b221734ddcede7b86b711b2af89..7051e6795325803c2c276fe7db88f3350d745027 100644 (file)
@@ -57,7 +57,7 @@
 
 #include <Aircraft/aircraft.hxx>
 #include <Airports/simple.hxx>
-#include <Astro/sky.hxx>
+#include <Astro/skydome.hxx>
 #include <Astro/stars.hxx>
 #include <Astro/solarsystem.hxx>
 #include <Autopilot/autopilot.hxx>
index ce58ec8a931ede767bf9d1559aca70d3688d0e33..cfbab6e8e46a92a87eb01811c28e9598a3e79010 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <Aircraft/aircraft.hxx>
 #include <Astro/solarsystem.hxx>
-#include <Astro/sky.hxx>
+// #include <Astro/skydome.hxx>
 #include <Autopilot/autopilot.hxx>
 #include <Cockpit/hud.hxx>
 #include <GUI/gui.h>
@@ -75,9 +75,9 @@ static void local_update_sky_and_lighting_params( void ) {
     // fgSunInit();
     SolarSystem::theSolarSystem->rebuild();
     cur_light_params.Update();
-    current_sky.repaint( cur_light_params.sky_color,
+    /* current_sky.repaint( cur_light_params.sky_color,
                         cur_light_params.fog_color,
-                        cur_light_params.sun_angle );
+                        cur_light_params.sun_angle ); */
 }
 
 
index d3ab52c9914ac1a37ba41b3b8b6606f471333648..ad019ceb3b951a9b9da60c59d4184aea8094f071 100644 (file)
@@ -74,7 +74,7 @@
 #include <Include/general.hxx>
 
 #include <Aircraft/aircraft.hxx>
-#include <Astro/sky.hxx>
+#include <Astro/skydome.hxx>
 #include <Astro/stars.hxx>
 #include <Astro/solarsystem.hxx>
 
@@ -310,18 +310,21 @@ void fgRenderFrame( void ) {
        // ssg does to set up the model view matrix
        xglMatrixMode(GL_MODELVIEW);
        xglLoadIdentity();
+
+       /*
        sgMat4 vm_tmp, view_mat;
        sgTransposeNegateMat4 ( vm_tmp, current_view.VIEW ) ;
        sgCopyMat4( view_mat, copy_of_ssgOpenGLAxisSwapMatrix ) ;
        sgPreMultMat4( view_mat, vm_tmp ) ;
        xglLoadMatrixf( (float *)view_mat );
+       */
 
        // draw sky
        xglDisable( GL_DEPTH_TEST );
-       xglDisable( GL_LIGHTING );
+       // xglDisable( GL_LIGHTING );
        xglDisable( GL_CULL_FACE );
-
        xglDisable( GL_FOG );
+       xglDisable( GL_TEXTURE_2D );
        /* if ( current_options.get_fog() > 0 ) {
            xglEnable( GL_FOG );
            xglFogi( GL_FOG_MODE, GL_EXP2 );
@@ -339,6 +342,10 @@ void fgRenderFrame( void ) {
                   current_view.get_cur_zero_elev().y(),
                   current_view.get_cur_zero_elev().z() );
 
+       current_sky.repaint( cur_light_params.sky_color,
+                            cur_light_params.fog_color,
+                            cur_light_params.sun_angle );
+
        current_sky.reposition( zero_elev, 
                                cur_fdm_state->get_Longitude(),
                                cur_fdm_state->get_Latitude(),
@@ -351,6 +358,8 @@ void fgRenderFrame( void ) {
 
        // xglDisable( GL_FOG );
 
+       /* 
+
        // setup transformation for drawing astronomical objects
        xglPushMatrix();
        // Translate to view position
@@ -373,6 +382,7 @@ void fgRenderFrame( void ) {
        glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
 
        xglPopMatrix();
+       */
 
        // draw scenery
        if ( current_options.get_shading() ) {
@@ -530,9 +540,9 @@ void fgRenderFrame( void ) {
        //         << current_weather.get_visibility() );
            
        if ( agl > 10.0 ) {
-           ssgSetNearFar( 10.0f, 100000.0f );
+           ssgSetNearFar( 10.0f, 120000.0f );
        } else {
-           ssgSetNearFar( 0.5f, 100000.0f );
+           ssgSetNearFar( 0.5f, 120000.0f );
        }
 
        if ( current_options.get_view_mode() == 
@@ -1339,7 +1349,6 @@ int main( int argc, char **argv ) {
     sky = new ssgRoot;
     sky->setName( "Sky" );
     current_sky.initialize( sky );
-    scene->addKid( sky );
 
     // temporary visible aircraft "own ship"
     penguin_sel = new ssgSelector;