|
|
Hi, i've written a patch that adds an interactive opengl preview. I want to
release it soon, but i'm having problems with matching the pov and ogl
views.
This is the code that i'm using to get pov's horizontal aperture and
converting that to opengl's vertical aperture:
VLength(Direction_Length, pCam->Direction);
VLength(Right_Length, pCam->Right);
Horizontal_Aperture = atan(Right_Length / Direction_Length);
Vertical_Aperture = atan(height * tan(Horizontal_Aperture) / width);
This code has been taken from 3.6 docs and from Paul Bourke's web site.
I'm using gluPerspective to set fov, and i'm using gluLook_At to position
camera.
Is there anyone that can help me with this?
Send me an email, i'd be happy to share the patch source with anyone
interested.
Dave
Post a reply to this message
|
|
|
|
David Curtis wrote:
> Hi, i've written a patch that adds an interactive opengl preview. I want to
> release it soon, but i'm having problems with matching the pov and ogl
> views.
<snip>
> This code has been taken from 3.6 docs and from Paul Bourke's web site.
> I'm using gluPerspective to set fov, and i'm using gluLook_At to position
> camera.
Why would you get such information from the documentation when you have
access to the POV-Ray sources code???
Thorsten
Post a reply to this message
|
|