ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/test.C
(Generate patch)

Comparing libgender/test.C (file contents):
Revision 1.7 by root, Sun Oct 3 03:17:09 2004 UTC vs.
Revision 1.9 by root, Sun Oct 3 04:00:51 2004 UTC

332 332
333 glShadeModel (GL_SMOOTH); 333 glShadeModel (GL_SMOOTH);
334 334
335 glEnable (GL_LIGHTING); 335 glEnable (GL_LIGHTING);
336 336
337 GLfloat lightc[4] = { 1, 0.1, 0.1, 1 }; 337 //GLfloat lightc[4] = { 1, 0.1, 0.1, 1 };
338 //glLightf (GL_LIGHT0, GL_QUADRATIC_ATTENUATION); 338 //glLightf (GL_LIGHT0, GL_QUADRATIC_ATTENUATION);
339 glLightfv (GL_LIGHT0, GL_DIFFUSE, lightc); 339 //glLightfv (GL_LIGHT0, GL_DIFFUSE, lightc);
340 glEnable (GL_LIGHT0); 340 glEnable (GL_LIGHT0);
341 glEnable (GL_COLOR_MATERIAL); 341 glEnable (GL_COLOR_MATERIAL);
342 342
343 /* Loop until done. */ 343 /* Loop until done. */
344 start_time = SDL_GetTicks (); 344 start_time = SDL_GetTicks ();
366 v.d.x = cos (ry); 366 v.d.x = cos (ry);
367 v.d.z = sin (ry); 367 v.d.z = sin (ry);
368#endif 368#endif
369 369
370 draw_context c; 370 draw_context c;
371 c.mode = draw_context::LIGHTED;
371 camera.draw (c); 372 camera.draw (c);
372 373
373 SDL_GL_SwapBuffers (); 374 SDL_GL_SwapBuffers ();
374 375
375 /* Check for error conditions. */ 376 /* Check for error conditions. */
385 fprintf (stderr, "testgl: SDL error '%s'\n", sdl_error); 386 fprintf (stderr, "testgl: SDL error '%s'\n", sdl_error);
386 SDL_ClearError (); 387 SDL_ClearError ();
387 } 388 }
388 389
389 /* Allow the user to see what's happening */ 390 /* Allow the user to see what's happening */
390 SDL_Delay (20); 391 //SDL_Delay (20);
391 392
392 /* Check if there's a pending event. */ 393 /* Check if there's a pending event. */
393 while (SDL_PollEvent (&event)) 394 while (SDL_PollEvent (&event))
394 { 395 {
395 done = HandleEvent (&event); 396 done = HandleEvent (&event);
432 int noframe = 0; 433 int noframe = 0;
433 int fsaa = 0; 434 int fsaa = 0;
434 435
435 // load a entity 436 // load a entity
436 txtprt_parser p; 437 txtprt_parser p;
437 entity_base *e; 438 entity *e;
438 try { 439 try {
439 e = p.read ("test.blasc"); 440 e = p.read ("test.blasc");
440 } catch (txtprt_i_exception & e) { 441 } catch (txtprt_i_exception & e) {
441 cout << "ERR: " << e.msg << endl; 442 cout << "ERR: " << e.msg << endl;
442 } 443 }
443 world.add (e); 444 e->show ();
444 445
445 logo = 0; 446 logo = 0;
446 slowly = 0; 447 slowly = 0;
447 numtests = 1; 448 numtests = 1;
448 for (i = 1; argv[i]; ++i) 449 for (i = 1; argv[i]; ++i)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines