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

Comparing libgender/test.C (file contents):
Revision 1.58 by root, Sun Oct 10 19:50:37 2004 UTC vs.
Revision 1.59 by root, Sun Oct 10 20:22:33 2004 UTC

327 glEnable (GL_LIGHTING); 327 glEnable (GL_LIGHTING);
328 glEnable (GL_LIGHT0); 328 glEnable (GL_LIGHT0);
329 329
330 init_shaders (); 330 init_shaders ();
331 331
332 osama_material osa_mat;
333
332 /* Loop until done. */ 334 /* Loop until done. */
333 start_time = SDL_GetTicks (); 335 start_time = SDL_GetTicks ();
334 frames = 0; 336 frames = 0;
335 337
336 while (!done) 338 while (!done)
356 ry += 0.001; 358 ry += 0.001;
357 camera.d.x = cos (ry); 359 camera.d.x = cos (ry);
358 camera.d.z = sin (ry); 360 camera.d.z = sin (ry);
359 //camera.d.y = sin (ry * 0.1); 361 //camera.d.y = sin (ry * 0.1);
360#endif 362#endif
363 osa_mat.begin ();
361 364
362 camera.begin (); 365 camera.begin ();
363 camera.pass (view::DEPTH); 366 camera.pass (view::DEPTH);
364 camera.pass (view::LIGHTED); 367 camera.pass (view::LIGHTED);
365 camera.end (); 368 camera.end ();
366 369
367 SDL_GL_SwapBuffers (); 370 SDL_GL_SwapBuffers ();
368 timer.frame (); 371 timer.frame ();
369 372
373 osa_mat.end ();
370 /* Check for error conditions. */ 374 /* Check for error conditions. */
371 gl_error = glGetError (); 375 gl_error = glGetError ();
372 376
373 if (gl_error != GL_NO_ERROR) fprintf (stderr, "testgl: OpenGL error: %d\n", gl_error); 377 if (gl_error != GL_NO_ERROR) fprintf (stderr, "testgl: OpenGL error: %d\n", gl_error);
374 378

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines