diff options
Diffstat (limited to 'progs/demos/engine.c')
-rw-r--r-- | progs/demos/engine.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/progs/demos/engine.c b/progs/demos/engine.c index c54e3b8fb80..a4148357d49 100644 --- a/progs/demos/engine.c +++ b/progs/demos/engine.c @@ -26,6 +26,8 @@ /* Target engine speed: */ const int RPM = 100.0; +static int Win = 0; + /** * Engine description. @@ -120,7 +122,11 @@ static Engine Engines[NUM_ENGINES] = 0.3, /* CrankJournalRadius */ 0.4, /* CrankJournalLength */ 1.5, /* ConnectingRodLength */ - 0.1 /* ConnectingRodThickness */ + 0.1, /* ConnectingRodThickness */ + 0, /* CrankList */ + 0, /* ConnRodList */ + 0, /* PistonList */ + 0 /* BlockList */ }, { "Inline-4", @@ -136,7 +142,11 @@ static Engine Engines[NUM_ENGINES] = 0.3, /* CrankJournalRadius */ 0.4, /* CrankJournalLength */ 1.5, /* ConnectingRodLength */ - 0.1 /* ConnectingRodThickness */ + 0.1, /* ConnectingRodThickness */ + 0, /* CrankList */ + 0, /* ConnRodList */ + 0, /* PistonList */ + 0 /* BlockList */ }, { "Boxer-6", @@ -152,7 +162,11 @@ static Engine Engines[NUM_ENGINES] = 0.3, /* CrankJournalRadius */ 0.4, /* CrankJournalLength */ 1.5, /* ConnectingRodLength */ - 0.1 /* ConnectingRodThickness */ + 0.1, /* ConnectingRodThickness */ + 0, /* CrankList */ + 0, /* ConnRodList */ + 0, /* PistonList */ + 0 /* BlockList */ } }; @@ -1142,6 +1156,7 @@ OptRotate(void) static void OptExit(void) { + glutDestroyWindow(Win); exit(0); } @@ -1311,7 +1326,7 @@ main(int argc, char *argv[]) glutInitWindowSize(WinWidth, WinHeight); glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); - glutCreateWindow("OpenGL Engine Demo"); + Win = glutCreateWindow("OpenGL Engine Demo"); glewInit(); glutReshapeFunc(Reshape); glutMouseFunc(Mouse); |