glperspective gluperspective aspect ratio?

secco's icon

hi all,

I'm trying to change the aspect ratio of my jit.gl.render.
I tried jit.gl.sketch with glperspective but nothing changes. Is that a mistake in the documentation? should it be gluperspective?
With gluperspective something happens but I don't understand the result. I expected it to be gluperspective fovy aspect zNear zFar.
I used values like gluperspective 45. 1. 0.1 10. but the results look somehow drastic. Like wrapped around. I can't figure out the right values. What's wrong with that. Is there any other possibility to set the aspect ratio?

thanks

secco

Wesley Smith's icon

Try this patch. The problem is most likely you're not changing the
matrixmode to projection and/or you're not loading the identity matrix
before calling gluperspective. If you read the spec on gluperspective
carefully, you'll see that it creates a matrix and then does the
equivalent of glmultmatrix on what is already loaded. This is a
common mistake.

Max Patch
Copy patch and select New From Clipboard in Max.

secco's icon

Thanks a lot wes. What do you mean with spec? The redbook?

secco

Wesley Smith's icon

I mean the manpage for the function which can be found in the redbook
or on the opengl site. You can also do a google search
"gluperspective site:apple.com"

wes

On 8/28/07, secco wrote:
>
> Thanks a lot wes. What do you mean with spec? The redbook?
>
> secco
>

Zachary Seldess's icon