Hi,
On 4/2/06, Bas wilbers <baswilbers / gmail.com> wrote:> anne001 wrote:> > what are you looking for. Can you give a specific example?>> well the camera stuff, and how can I make that a cube gets smaller when> it's further away. also the texture part is weird I know how it works> but when I rotate the object it does weird stuff.>> mostly the camera part is what I was looking for.
here's the rendering loop for a scene with aperspective projection camera and double buffering:
include GLloop do  MatrixMode(PROJECTION)  LoadIdentity()  Perspective(    camera.fov,    viewport.width.to_f / viewport.height,    camera.near_clip,    camera.far_clip)  MatrixMode(MODELVIEW)  LoadIdentity()  LookAt(    camera.position,    camera.looking_at,    camera.up_vector)
  call_frame_handlers_to_update_scene_and_camera
  draw scene
  swap_buffersend
HTH,Ilmari