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

Comparing libgender/test.C (file contents):
Revision 1.14 by root, Sun Oct 3 23:32:57 2004 UTC vs.
Revision 1.15 by root, Sun Oct 3 23:59:30 2004 UTC

369 draw_context c (camera); 369 draw_context c (camera);
370 c.mode = draw_context::LIGHTED; 370 c.mode = draw_context::LIGHTED;
371 camera.draw (c); 371 camera.draw (c);
372 372
373 SDL_GL_SwapBuffers (); 373 SDL_GL_SwapBuffers ();
374 timer.frame ();
374 375
375 /* Check for error conditions. */ 376 /* Check for error conditions. */
376 gl_error = glGetError (); 377 gl_error = glGetError ();
377 378
378 if (gl_error != GL_NO_ERROR) 379 if (gl_error != GL_NO_ERROR)
434 435
435 gl_matrix m(2); 436 gl_matrix m(2);
436 m.translate (vec3 (2,3,4)); 437 m.translate (vec3 (2,3,4));
437 438
438 // load a entity 439 // load a entity
439 for (int i = 0; i < 10; i++) { 440 for (int i = 0; i < 7; i++) {
440 txtprt_parser p; 441 txtprt_parser p;
441 entity_transform *f = new entity_transform; 442 entity_anim *f = new entity_anim;
442 entity *e; 443 entity *e;
443 try { 444 try {
444 e = p.read ("test.blasc"); 445 e = p.read ("test.blasc");
445 } catch (txtprt_i_exception & e) { 446 } catch (txtprt_i_exception & e) {
446 cout << "ERR: " << e.msg << endl; 447 cout << "ERR: " << e.msg << endl;
447 } 448 }
448 f->set (e); 449 f->set (e);
449 f->m.translate (vec3 (i, -1, 0)); 450 f->m.translate (vec3 (i, -1, 0));
450 f->m.rotate (i * 10, vec3 (0, 0, 1)); 451 f->vx = i * 10 + 5;
452 f->vy = i * 40 + 5;
453 f->vz = i * 60 + 5;
451 f->show (); 454 f->show ();
452 } 455 }
453 456
454 logo = 0; 457 logo = 0;
455 slowly = 0; 458 slowly = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines