FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

sio2CameraRender bug ?

2 posters

Go down

sio2CameraRender bug ? Empty sio2CameraRender bug ?

Post  glDisable Wed Mar 11, 2009 6:22 pm

Hello!

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:

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:
Code:
   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.

glDisable

Posts : 3
Join date : 2009-03-11

Back to top Go down

sio2CameraRender bug ? Empty Re: sio2CameraRender bug ?

Post  sio2interactive 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
sio2interactive
sio2interactive

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

http://sio2interactive.com

Back to top Go down

Back to top


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