Didn't set the version as a string
[crack-attack.git] / src / obj_garbage_thin_middle.cxx
blob7342e0e97af5c390f6b46ca9d0928ccc88d55b97
1 /*
2 * garbage_thin_middle.cxx
3 * Daniel Nelson - 9/1/0
5 * Copyright (C) 2000 Daniel Nelson
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Daniel Nelson - aluminumangel.org
22 * 174 W. 18th Ave.
23 * Columbus, OH 43210
25 * Generates a display list for the middle of thin garbage.
28 #include <GL/glut.h>
30 #ifndef _WIN32
31 #else
32 # include <glext.h>
33 #endif
35 using namespace std;
37 #include "Game.h"
38 #include "Displayer.h"
40 GLuint Displayer::garbage_thin_middle_list;
42 void Displayer::generateGarbageThinMiddleList ( )
44 garbage_thin_middle_list = glGenLists(1);
46 glEnableClientState(GL_VERTEX_ARRAY);
47 glEnableClientState(GL_NORMAL_ARRAY);
48 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
50 glNewList(garbage_thin_middle_list, GL_COMPILE);
52 GLfloat vertices_0[3 * 18] =
54 -1.0f, -0.8f, -1.0f,
55 1.0f, -0.8f, -1.0f,
56 -1.0f, -1.0f, -0.8f,
57 1.0f, -1.0f, -0.8f,
58 -1.0f, -1.0f, 0.8f,
59 1.0f, -1.0f, 0.8f,
60 -1.0f, -0.8f, 1.0f,
61 1.0f, -0.8f, 1.0f,
62 -1.0f, 0.8f, 1.0f,
63 1.0f, 0.8f, 1.0f,
64 -1.0f, 1.0f, 0.8f,
65 1.0f, 1.0f, 0.8f,
66 -1.0f, 1.0f, -0.8f,
67 1.0f, 1.0f, -0.8f,
68 -1.0f, 0.8f, -1.0f,
69 1.0f, 0.8f, -1.0f,
70 -1.0f, -0.8f, -1.0f,
71 1.0f, -0.8f, -1.0f
74 GLfloat normals_0[3 * 18] =
76 0.0f, 0.0f, -1.0f,
77 0.0f, 0.0f, -1.0f,
78 0.0f, -1.0f, 0.0f,
79 0.0f, -1.0f, 0.0f,
80 0.0f, -1.0f, 0.0f,
81 0.0f, -1.0f, 0.0f,
82 0.0f, 0.0f, 1.0f,
83 0.0f, 0.0f, 1.0f,
84 0.0f, 0.0f, 1.0f,
85 0.0f, 0.0f, 1.0f,
86 0.0f, 1.0f, 0.0f,
87 0.0f, 1.0f, 0.0f,
88 0.0f, 1.0f, 0.0f,
89 0.0f, 1.0f, 0.0f,
90 0.0f, 0.0f, -1.0f,
91 0.0f, 0.0f, -1.0f,
92 0.0f, 0.0f, -1.0f,
93 0.0f, 0.0f, -1.0f
96 GLfloat tex_coords_0[3 * 18];
97 for (int n = 3 * 18; n--; )
98 tex_coords_0[n] = vertices_0[n] * DC_GARBAGE_LIGHTMAP_COORD_CONVERTER;
100 glVertexPointer(3, GL_FLOAT, 0, vertices_0);
101 glNormalPointer(GL_FLOAT, 0, normals_0);
102 glTexCoordPointer(3, GL_FLOAT, 0, tex_coords_0);
103 glDrawArrays(GL_TRIANGLE_STRIP, 0, 18);
105 glEndList();
107 glDisableClientState(GL_VERTEX_ARRAY);
108 glDisableClientState(GL_NORMAL_ARRAY);
109 glDisableClientState(GL_TEXTURE_COORD_ARRAY);