Organizational tweaking.
This commit is contained in:
parent
53a9e29865
commit
1b7267aaad
3 changed files with 16 additions and 53 deletions
|
@ -33,10 +33,6 @@
|
||||||
#ifdef GLUT
|
#ifdef GLUT
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include "GLUTkey.h"
|
#include "GLUTkey.h"
|
||||||
#elif MESA_TK
|
|
||||||
/* assumes -I/usr/include/mesa in compile command */
|
|
||||||
#include "gltk.h"
|
|
||||||
#include "GLTKkey.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../constants.h"
|
#include "../constants.h"
|
||||||
|
@ -242,8 +238,6 @@ static void fgUpdateVisuals( void ) {
|
||||||
|
|
||||||
#ifdef GLUT
|
#ifdef GLUT
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
#elif MESA_TK
|
|
||||||
tkSwapBuffers();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,6 +408,7 @@ static void fgMainLoop( void ) {
|
||||||
fgUpdateVisuals();
|
fgUpdateVisuals();
|
||||||
|
|
||||||
if ( ! use_signals ) {
|
if ( ! use_signals ) {
|
||||||
|
/* flight model */
|
||||||
fgUpdateTimeDepCalcs(multi_loop);
|
fgUpdateTimeDepCalcs(multi_loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,18 +486,6 @@ int main( int argc, char *argv[] ) {
|
||||||
|
|
||||||
/* Initialize windows */
|
/* Initialize windows */
|
||||||
glutCreateWindow("Flight Gear");
|
glutCreateWindow("Flight Gear");
|
||||||
|
|
||||||
#elif MESA_TK
|
|
||||||
/* Define initial window size */
|
|
||||||
tkInitPosition(0, 0, 640, 480);
|
|
||||||
|
|
||||||
/* Define Display Parameters */
|
|
||||||
tkInitDisplayMode( TK_RGB | TK_DEPTH | TK_DOUBLE | TK_DIRECT );
|
|
||||||
|
|
||||||
/* Initialize the main window */
|
|
||||||
if (tkInitWindow("Flight Gear") == GL_FALSE) {
|
|
||||||
tkQuit();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* seed the random number generater */
|
/* seed the random number generater */
|
||||||
|
@ -623,42 +606,26 @@ int main( int argc, char *argv[] ) {
|
||||||
|
|
||||||
/* pass control off to the GLUT event handler */
|
/* pass control off to the GLUT event handler */
|
||||||
glutMainLoop();
|
glutMainLoop();
|
||||||
#elif MESA_TK
|
|
||||||
/* call fgReshape() on expose events */
|
|
||||||
tkExposeFunc( fgReshape );
|
|
||||||
|
|
||||||
/* call fgReshape() on window resizes */
|
|
||||||
tkReshapeFunc( fgReshape );
|
|
||||||
|
|
||||||
/* call key() on keyboard event */
|
|
||||||
tkKeyDownFunc( GLTKkey );
|
|
||||||
|
|
||||||
/* call fgMainLoop() whenever there is nothing else to do */
|
|
||||||
tkIdleFunc( fgMainLoop );
|
|
||||||
|
|
||||||
/* draw the scene */
|
|
||||||
tkDisplayFunc( fgUpdateVisuals );
|
|
||||||
|
|
||||||
/* pass control off to the tk event handler */
|
|
||||||
tkExec();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef NO_PRINTF
|
#ifdef NO_PRINTF
|
||||||
|
#include <stdarg.h>
|
||||||
#include <stdarg.h>
|
int printf (const char *format, ...) {
|
||||||
int printf (const char *format, ...) {
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.1 1997/08/02 18:45:00 curt
|
/* Revision 1.2 1997/08/04 20:25:15 curt
|
||||||
/* Renamed GLmain.c GLUTmain.c
|
/* Organizational tweaking.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.1 1997/08/02 18:45:00 curt
|
||||||
|
* Renamed GLmain.c GLUTmain.c
|
||||||
|
*
|
||||||
* Revision 1.43 1997/08/02 16:23:47 curt
|
* Revision 1.43 1997/08/02 16:23:47 curt
|
||||||
* Misc. tweaks.
|
* Misc. tweaks.
|
||||||
*
|
*
|
||||||
|
|
|
@ -26,13 +26,12 @@
|
||||||
|
|
||||||
TARGET=fg0
|
TARGET=fg0
|
||||||
|
|
||||||
CFILES = GLUTmain.c $(INTERFACE_FILES) mesh2GL.c
|
CFILES = GLUTmain.c $(INTERFACE_FILES)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
AFILES = ../Aircraft/libAircraft.a ../Controls/libControls.a \
|
AFILES = ../Aircraft/libAircraft.a ../Controls/libControls.a \
|
||||||
../Flight/libFlight.a ../Flight/LaRCsim/libLaRCsim.a \
|
../Flight/libFlight.a ../Flight/LaRCsim/libLaRCsim.a \
|
||||||
../Flight/Slew/libSlew.a ../Math/libMath.a \
|
../Flight/Slew/libSlew.a ../Scenery/libScenery.a \
|
||||||
../Scenery/libScenery.a \
|
../Time/libTime.a ../Weather/libWeather.a ../Math/libMath.a
|
||||||
../Time/libTime.a ../Weather/libWeather.a
|
|
||||||
|
|
||||||
|
|
||||||
include ../make.inc
|
include ../make.inc
|
||||||
|
@ -70,12 +69,12 @@ GLUTkey.o:
|
||||||
GLTKkey.o:
|
GLTKkey.o:
|
||||||
$(CC) $(CFLAGS) -c GLTKkey.c -o $@
|
$(CC) $(CFLAGS) -c GLTKkey.c -o $@
|
||||||
|
|
||||||
mesh2GL.o:
|
|
||||||
$(CC) $(CFLAGS) -c mesh2GL.c -o $@
|
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.29 1997/08/04 20:25:15 curt
|
||||||
|
# Organizational tweaking.
|
||||||
|
#
|
||||||
# Revision 1.28 1997/08/02 18:45:01 curt
|
# Revision 1.28 1997/08/02 18:45:01 curt
|
||||||
# Renamed GLmain.c GLUTmain.c
|
# Renamed GLmain.c GLUTmain.c
|
||||||
#
|
#
|
||||||
|
|
|
@ -20,6 +20,3 @@ GLmain.o: GLmain.c ../constants.h ../Aircraft/aircraft.h \
|
||||||
../Scenery/scenery.h ../Math/fg_random.h ../Math/mat3.h \
|
../Scenery/scenery.h ../Math/fg_random.h ../Math/mat3.h \
|
||||||
../Math/polar.h ../Math/../types.h ../Time/fg_timer.h \
|
../Math/polar.h ../Math/../types.h ../Time/fg_timer.h \
|
||||||
../Weather/weather.h
|
../Weather/weather.h
|
||||||
mesh2GL.o: mesh2GL.c ../constants.h ../Scenery/mesh.h \
|
|
||||||
../Scenery/scenery.h ../Math/fg_geodesy.h ../Math/fg_random.h \
|
|
||||||
../Math/mat3.h ../Math/polar.h ../Math/../types.h
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue