Skip to main content
gamedev.net
🔒 Locked

perspectives

Started by maddanio Jan 11, 2003 at 3:14 PM 0 replies 400+ views
Original Post
maddanio
maddanio
hi folks. i am very new with gl, and i have a problem (nice start heh? ): i have to draw and animate a bunch of squares made of 64 by 64 squares each with different colours. its all 2d, but i will need zooming. no lighting, no alpha! now i based it all on tutorial 12 from hene in cocoa (macosx). the source supplied works perfect, but when i use it i am unable to use perspective roatation (using other values in gluperspectives roatation than 0.0 makes it invisible ). also the asepct ratio part doesnt seem to be effective (while it is in the demo). last but not least i cant use full screen, right, again goes invisible . any suggestions to where the fluke might be? i dont get any errormessages, exceptions or console messages. as far as i tracked it down i do all the same as in the demo, except i dont use txture but a diaplylist of the squuares (there is some calculations in between beginlist() and endlist(), dunno if that does anything...). i use a slightly different timer setup too... i am under a bit of deadline pressure for a mediamaster project, so it would be nice if someone could help me wuick . cheers, daniel cheers, daniel
cheers,daniel
HalcyonBlaze
HalcyonBlaze
Um...maybe you could put up the code for the section where you are setting the perspective up? But possible errors are:
[list]
[*] You could be using glLoadIdentity() after using gluPerspective but before you switch back to the modelview matrix.
[*] Make sure your format is like this in gluPerspectice:

gluPerspective(fovy, aspect ratio, viewport width/viewport height, near plane [must be greater than ], far plane [must not be equal to near plane]);

Ideally the fovy is set to somethign around 45.0f degrees.
[/list]
People could help more if you put up the code for the perspective or the area where you know the problem is located at.

- Halcyon
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, 1949

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.