Debugging output tweaks.
Cast glGetString to (char *) to avoid compiler errors. Optimizations to fgGluLookAt() by Norman Vine.
This commit is contained in:
parent
9e301558c9
commit
f6f21702ce
4 changed files with 41 additions and 13 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue