sio2CameraRender bug ?

Go down

sio2CameraRender bug ?

Post  glDisable on Wed Mar 11, 2009 6:22 pm


I think there is a small bug in sio2RenderCamera. If you try to build a top view (like the one in Blender) camera the transformation matrix is "O" and after the glTransformRender( camera->transform ); everything is fubared Smile
Tested with the following code:

   camera = glCameraInit("Camera");
   camera->transform->loc->x =  0.0f;
   camera->transform->loc->y =  0.0f;
   camera->transform->loc->z = 10.0f;

   camera->transform->dir->x =  0.0f;
   camera->transform->dir->y =  0.0f;
   camera->transform->dir->z = -1.0f;

Shouldn't be something like:
   if(camera->transform->dir->y != camera->transform->dir->y)
          // compute camera transform matrix
        // render matrix
//translate to camera position
...or something like that... I'm not sure if this is the fix.


Posts : 3
Join date : 2009-03-11

View user profile

Back to top Go down

Re: sio2CameraRender bug ?

Post  sio2interactive on Wed Mar 11, 2009 6:48 pm

Hummm Im aware of this problem but haven't find a fix that can fit in every situation, you'll get the same problem with gluLookAt

SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum