]> git.mxchange.org Git - flightgear.git/commitdiff
Debugging output tweaks.
authorcurt <curt>
Fri, 24 Jul 1998 21:39:08 +0000 (21:39 +0000)
committercurt <curt>
Fri, 24 Jul 1998 21:39:08 +0000 (21:39 +0000)
Cast glGetString to (char *) to avoid compiler errors.
Optimizations to fgGluLookAt() by Norman Vine.

Main/GLUTmain.cxx
Main/airports.hxx
Main/fg_init.cxx
Main/views.cxx

index ee61bb56b5bc6049bf97c3cc95b3bf63276249db..a840efd7a3eb3021735affcd9a8003b19c7e752a 100644 (file)
@@ -243,7 +243,7 @@ static void fgUpdateViewParams( void ) {
 }
 
 
-#ifdef 0
+#ifdef IS_THIS_BETTER_THAN_A_ZERO_CHARLIE
 // Draw a basic instrument panel
 static void fgUpdateInstrViewParams( void ) {
 
@@ -502,9 +502,9 @@ void fgUpdateTimeDepCalcs(int multi_loop) {
     while ( tmp > FG_2PI ) {
        tmp -= FG_2PI;
     }
-    printf("Psi = %.2f, viewoffset = %.2f sunrot = %.2f rottosun = %.2f\n",
+    /* printf("Psi = %.2f, viewoffset = %.2f sunrot = %.2f rottosun = %.2f\n",
           FG_Psi * RAD_TO_DEG, v->view_offset * RAD_TO_DEG, 
-          -(l->sun_rotation+FG_PI) * RAD_TO_DEG, tmp * RAD_TO_DEG);
+          -(l->sun_rotation+FG_PI) * RAD_TO_DEG, tmp * RAD_TO_DEG); */
     l->UpdateAdjFog();
 }
 
@@ -924,6 +924,11 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.39  1998/07/24 21:39:08  curt
+// Debugging output tweaks.
+// Cast glGetString to (char *) to avoid compiler errors.
+// Optimizations to fgGluLookAt() by Norman Vine.
+//
 // Revision 1.38  1998/07/22 21:40:43  curt
 // Clear to adjusted fog color (for sunrise/sunset effects)
 // Make call to fog sunrise/sunset adjustment method.
index f34ed6221114b19d55b07bb2893cc200cd96f6d6..fb854e08adf3386e5e7cb01437666a1479ff2c5d 100644 (file)
@@ -34,8 +34,9 @@
 #endif                                   
 
 
-#include <string>          // Standard C++ string library
-#include <map>             // STL associative "array"
+#include <string>        // Standard C++ string library
+#include <map>           // STL associative "array"
+
 #ifdef NEEDNAMESPACESTD
 using namespace std;
 #endif
@@ -73,6 +74,11 @@ public:
 
 
 // $Log$
+// Revision 1.7  1998/07/24 21:39:09  curt
+// Debugging output tweaks.
+// Cast glGetString to (char *) to avoid compiler errors.
+// Optimizations to fgGluLookAt() by Norman Vine.
+//
 // Revision 1.6  1998/07/06 21:34:19  curt
 // Added an enable/disable splash screen option.
 // Added an enable/disable intro music option.
index 3576a0b1c874ad1dd7bea7f9846a3bc311084a1c..88689046da1aba2d08580e005461bcb1389ec568 100644 (file)
@@ -186,9 +186,9 @@ int fgInitGeneral( void ) {
     fgPrintf( FG_GENERAL, FG_INFO, "General Initialization\n" );
     fgPrintf( FG_GENERAL, FG_INFO, "======= ==============\n" );
 
-    g->glVendor = glGetString ( GL_VENDOR );
-    g->glRenderer = glGetString ( GL_RENDERER );
-    g->glVersion = glGetString ( GL_VERSION );
+    g->glVendor = (char *)glGetString ( GL_VENDOR );
+    g->glRenderer = (char *)glGetString ( GL_RENDERER );
+    g->glVersion = (char *)glGetString ( GL_VERSION );
 
     current_options.get_fg_root(root);
     if ( !strlen(root) ) { 
@@ -401,6 +401,11 @@ int fgInitSubsystems( void ) {
 
 
 // $Log$
+// Revision 1.27  1998/07/24 21:39:10  curt
+// Debugging output tweaks.
+// Cast glGetString to (char *) to avoid compiler errors.
+// Optimizations to fgGluLookAt() by Norman Vine.
+//
 // Revision 1.26  1998/07/22 21:40:44  curt
 // Clear to adjusted fog color (for sunrise/sunset effects)
 // Make call to fog sunrise/sunset adjustment method.
index bd9c4b99c5e335eb7a0a00202245f9cde043a947..7fc96f1c5d38ba8342e023f41d5526750091ade1 100644 (file)
@@ -447,15 +447,22 @@ void fg_gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
     M(0,0) = x[0];  M(0,1) = x[1];  M(0,2) = x[2];  M(0,3) = 0.0;
     M(1,0) = y[0];  M(1,1) = y[1];  M(1,2) = y[2];  M(1,3) = 0.0;
     M(2,0) = z[0];  M(2,1) = z[1];  M(2,2) = z[2];  M(2,3) = 0.0;
-    M(3,0) = 0.0;   M(3,1) = 0.0;   M(3,2) = 0.0;   M(3,3) = 1.0;
+    // the following is part of the original gluLookAt(), but we are
+    // commenting it out because we know we are going to be doing a
+    // translation below which will set these values anyways
+    // M(3,0) = 0.0;   M(3,1) = 0.0;   M(3,2) = 0.0;   M(3,3) = 1.0;
 #undef M
 
     // Translate Eye to Origin
     // replaces: glTranslated( -eyex, -eyey, -eyez );
-    m[12] = m[0] * -eyex + m[4] * -eyey + m[8]  * -eyez + m[12];
-    m[13] = m[1] * -eyex + m[5] * -eyey + m[9]  * -eyez + m[13];
-    m[14] = m[2] * -eyex + m[6] * -eyey + m[10] * -eyez + m[14];
-    m[15] = m[3] * -eyex + m[7] * -eyey + m[11] * -eyez + m[15];
+
+    // this has been slightly modified from the original glTranslate()
+    // code because we know that coming into this m[12] = m[13] =
+    // m[14] = 0.0, and m[15] = 1.0;
+    m[12] = m[0] * -eyex + m[4] * -eyey + m[8]  * -eyez /* + m[12] */;
+    m[13] = m[1] * -eyex + m[5] * -eyey + m[9]  * -eyez /* + m[13] */;
+    m[14] = m[2] * -eyex + m[6] * -eyey + m[10] * -eyez /* + m[14] */;
+    m[15] = 1.0 /* m[3] * -eyex + m[7] * -eyey + m[11] * -eyez + m[15] */;
 
     // xglMultMatrixd( m );
     xglLoadMatrixd( m );
@@ -463,6 +470,11 @@ void fg_gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
 
 
 // $Log$
+// Revision 1.17  1998/07/24 21:39:12  curt
+// Debugging output tweaks.
+// Cast glGetString to (char *) to avoid compiler errors.
+// Optimizations to fgGluLookAt() by Norman Vine.
+//
 // Revision 1.16  1998/07/13 21:01:41  curt
 // Wrote access functions for current fgOPTIONS.
 //