1 // Scenery management routines
3 /* static void fgSceneryInit_OLD() { */
5 /* scenery = fgSceneryCompile_OLD();
6 runway = fgRunwayHack_OLD(0.69, 53.07);
10 /* create the scenery */
11 /* GLint fgSceneryCompile_OLD() {
14 scenery = mesh2GL(mesh_ptr_OLD);
20 /* hack in a runway */
21 /* GLint fgRunwayHack_OLD(double width, double length) {
22 static GLfloat concrete[4] = { 0.5, 0.5, 0.5, 1.0 };
23 static GLfloat line[4] = { 0.9, 0.9, 0.9, 1.0 };
26 float line_len, line_width_2, cur_pos;
28 runway = xglGenLists(1);
29 xglNewList(runway, GL_COMPILE);
32 /* xglBegin(GL_POLYGON);
33 xglMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, concrete );
34 xglNormal3f(0.0, 0.0, 1.0);
36 xglVertex3d( 0.0, -width/2.0, 0.0);
37 xglVertex3d( 0.0, width/2.0, 0.0);
38 xglVertex3d(length, width/2.0, 0.0);
39 xglVertex3d(length, -width/2.0, 0.0);
42 /* draw center line */
43 /* xglMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, line );
44 line_len = length / ( 2 * num_lines + 1);
45 printf("line_len = %.3f\n", line_len);
48 for ( i = 0; i < num_lines; i++ ) {
50 xglVertex3d( cur_pos, -line_width_2, 0.005);
51 xglVertex3d( cur_pos, line_width_2, 0.005);
53 xglVertex3d( cur_pos, line_width_2, 0.005);
54 xglVertex3d( cur_pos, -line_width_2, 0.005);
65 /* draw the scenery */
66 /*static void fgSceneryDraw_OLD() {
67 static float z = 32.35;
73 printf("*** Drawing runway at %.2f\n", z);
75 xglTranslatef( -398391.28, 120070.41, 32.35);
76 xglRotatef(170.0, 0.0, 0.0, 1.0);