Cast glGetString to (char *) to avoid compiler errors.
Optimizations to fgGluLookAt() by Norman Vine.
}
-#ifdef 0
+#ifdef IS_THIS_BETTER_THAN_A_ZERO_CHARLIE
// Draw a basic instrument panel
static void fgUpdateInstrViewParams( void ) {
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();
}
// $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.
#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
// $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.
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) ) {
// $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.
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 );
// $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.
//