Changeset 2731 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Nov 5, 2004, 10:40:08 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world.cc
r2644 r2731 169 169 170 170 } 171 172 // initialize debug coord system 173 objectList = glGenLists(1); 174 glNewList (objectList, GL_COMPILE); 175 glLoadIdentity(); 176 glBegin(GL_LINES); 177 178 for( float x = -128.0; x < 128.0; x += 25.0) 179 { 180 for( float y = -128.0; y < 128.0; y += 25.0) 181 { 182 glColor3f(1,0,0); 183 glVertex3f(x,y,-128.0); 184 glVertex3f(x,y,0.0); 185 glColor3f(0.5,0,0); 186 glVertex3f(x,y,0.0); 187 glVertex3f(x,y,128.0); 188 } 189 } 190 for( float y = -128.0; y < 128.0; y += 25.0) 191 { 192 for( float z = -128.0; z < 128.0; z += 25.0) 193 { 194 glColor3f(0,1,0); 195 glVertex3f(-128.0,y,z); 196 glVertex3f(0.0,y,z); 197 glColor3f(0,0.5,0); 198 glVertex3f(0.0,y,z); 199 glVertex3f(128.0,y,z); 200 } 201 } 202 for( float x = -128.0; x < 128.0; x += 25.0) 203 { 204 for( float z = -128.0; z < 128.0; z += 25.0) 205 { 206 glColor3f(0,0,1); 207 glVertex3f(x,-128.0,z); 208 glVertex3f(x,0.0,z); 209 glColor3f(0,0,0.5); 210 glVertex3f(x,0.0,z); 211 glVertex3f(x,128.0,z); 212 } 213 214 } 215 216 //draw track 217 glColor3f(0,1,1); 218 for( int i = 0; i < tracklen; i++) 219 { 220 glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z); 221 glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z); 222 } 223 glEnd(); 224 glEndList(); 171 225 } 172 226 … … 234 288 235 289 // draw debug coord system 236 glLoadIdentity(); 237 238 239 glBegin(GL_LINES); 240 241 for( float x = -128.0; x < 128.0; x += 25.0) 242 { 243 for( float y = -128.0; y < 128.0; y += 25.0) 244 { 245 glColor3f(1,0,0); 246 glVertex3f(x,y,-128.0); 247 glVertex3f(x,y,0.0); 248 glColor3f(0.5,0,0); 249 glVertex3f(x,y,0.0); 250 glVertex3f(x,y,128.0); 251 } 252 } 253 for( float y = -128.0; y < 128.0; y += 25.0) 254 { 255 for( float z = -128.0; z < 128.0; z += 25.0) 256 { 257 glColor3f(0,1,0); 258 glVertex3f(-128.0,y,z); 259 glVertex3f(0.0,y,z); 260 glColor3f(0,0.5,0); 261 glVertex3f(0.0,y,z); 262 glVertex3f(128.0,y,z); 263 } 264 } 265 for( float x = -128.0; x < 128.0; x += 25.0) 266 { 267 for( float z = -128.0; z < 128.0; z += 25.0) 268 { 269 glColor3f(0,0,1); 270 glVertex3f(x,-128.0,z); 271 glVertex3f(x,0.0,z); 272 glColor3f(0,0,0.5); 273 glVertex3f(x,0.0,z); 274 glVertex3f(x,128.0,z); 275 } 276 277 } 278 279 //draw track 280 glColor3f(0,1,1); 281 for( int i = 0; i < tracklen; i++) 282 { 283 glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z); 284 glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z); 285 } 286 glEnd(); 290 glCallList (objectList); 291 292 287 293 } 288 294 -
orxonox/trunk/src/world.h
r2644 r2731 69 69 char* worldName; 70 70 int debugWorldNr; 71 GLuint objectList; 71 72 72 73 WorldEntity* localPlayer;
Note: See TracChangeset
for help on using the changeset viewer.