Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Udayan

OpenGL openGL newbie question!

This topic is 5780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am following NeHe''s tutorial, and just on lesson 2!! Ok, I get the triangle and the square. When I resize the window (by mouse) vertically, the triangle and square get scaled. When I do the same horizontally, they get clipped. Why is so? The code for "ReSizeGLScene" function seems symmetric wrt width and height!¨ Thanks a lot Uday

Share this post


Link to post
Share on other sites
Advertisement
I have no idea why this is! I had never even consiously noticed this until now, I just accepted it. I am afraid that I don''t know the answer. It is probably in the Red or Blue Book somewhere on the projection matrix.

Do not meddle in the affairs of moderators, for they are subtle and quick to anger.


ANDREW RUSSELL STUDIOS
Cool Links :: [ GD | TG | MS | NeHe | PA | SA | M&S | TA | LiT | H*R ]
Got Clue? :: [ Start Here! | Google | MSDN | GameDev.net Reference | OGL v D3D | File Formats | Go FAQ yourself ]

Share this post


Link to post
Share on other sites
are u sticking the right numbers in
glViewPort(..)
also in gluPerspective make sure the aspect value is correct
ie width/height if width or height is an int it wont work (make sure theyre floats)



http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
I believe that is because the field of view is staying the same but the aspect ratio is being calculated on the fly every time you resize the window.

- CheeseMonger

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!