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

Comparing libgender/test.C (file contents):
Revision 1.11 by root, Sun Oct 3 05:53:09 2004 UTC vs.
Revision 1.12 by root, Sun Oct 3 20:14:33 2004 UTC

309 printf ("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, 309 printf ("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa,
310 value); 310 value);
311 } 311 }
312 312
313 /* Set the window manager title bar */ 313 /* Set the window manager title bar */
314 SDL_WM_SetCaption ("SDL GL test", "testgl"); 314 SDL_WM_SetCaption ("libgender rendering test", "gendertest");
315 315
316 /* Set the gamma for the window */ 316 /* Set the gamma for the window */
317 if (gamma != 0.0) 317 if (gamma != 0.0)
318 SDL_SetGamma (gamma, gamma, gamma); 318 SDL_SetGamma (gamma, gamma, gamma);
319 319
324 camera.fov = 90; 324 camera.fov = 90;
325 325
326 glMatrixMode (GL_MODELVIEW); 326 glMatrixMode (GL_MODELVIEW);
327 glLoadIdentity (); 327 glLoadIdentity ();
328 328
329 //glEnable (GL_CULL_FACE);
329 glEnable (GL_DEPTH_TEST); 330 glEnable (GL_DEPTH_TEST);
330
331 glDepthFunc (GL_LESS); 331 glDepthFunc (GL_LESS);
332
333 glShadeModel (GL_SMOOTH); 332 glShadeModel (GL_SMOOTH);
334 333
335 glEnable (GL_LIGHTING); 334 glEnable (GL_LIGHTING);
336
337 //GLfloat lightc[4] = { 1, 0.1, 0.1, 1 }; 335 //GLfloat lightc[4] = { 1, 0.1, 0.1, 1 };
338 //glLightf (GL_LIGHT0, GL_QUADRATIC_ATTENUATION); 336 //glLightf (GL_LIGHT0, GL_QUADRATIC_ATTENUATION);
339 //glLightfv (GL_LIGHT0, GL_DIFFUSE, lightc); 337 //glLightfv (GL_LIGHT0, GL_DIFFUSE, lightc);
340 glEnable (GL_LIGHT0); 338 glEnable (GL_LIGHT0);
341 glEnable (GL_COLOR_MATERIAL);
342 339
343 /* Loop until done. */ 340 /* Loop until done. */
344 start_time = SDL_GetTicks (); 341 start_time = SDL_GetTicks ();
345 frames = 0; 342 frames = 0;
346 while (!done) 343 while (!done)
432 float gamma = 0.0; 429 float gamma = 0.0;
433 int noframe = 0; 430 int noframe = 0;
434 int fsaa = 0; 431 int fsaa = 0;
435 432
436 // load a entity 433 // load a entity
434 for (int i = 0; i < 1; i++) {
437 txtprt_parser p; 435 txtprt_parser p;
438 entity *e; 436 entity *e;
439 try { 437 try {
440 e = p.read ("test.blasc"); 438 e = p.read ("test.blasc");
441 } catch (txtprt_i_exception & e) { 439 } catch (txtprt_i_exception & e) {
442 cout << "ERR: " << e.msg << endl; 440 cout << "ERR: " << e.msg << endl;
443 } 441 }
442 e->orig.x += i;
443 e->orig.y += i;
444 e->orig.z += i;
444 e->show (); 445 e->show ();
446 printf ("load entity %p -> %p\n", e, e->content ());
447 }
445 448
446 logo = 0; 449 logo = 0;
447 slowly = 0; 450 slowly = 0;
448 numtests = 1; 451 numtests = 1;
449 for (i = 1; argv[i]; ++i) 452 for (i = 1; argv[i]; ++i)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines