Jump to content
  • Advertisement

Archived

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

NickB

OGL Coordinates and World Scaling

This topic is 6592 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

Stupid question, however: In OpenGL, how do the coordinates work (ie relate to the screen) ? especially, what are the x and y limits, if I render a rectangle on the plane z=0 ? (assuming that the camara is at 0,0,0 and facing down the z-axis) {I guess the question comes down to what are the x and y limits of the screen plane} Secondly, how do game developers scale their worlds ? do they just try it and see until they find a scaling factor that looks right to them ? is there a more efficient way ? Any light that can be thrown on this this will be appreciated, Nick B

Share this post


Link to post
Share on other sites
Advertisement
You have to set up z limit, anything beond it is clipped away. You can usually just change the field of view to make it look bigger or smaller. How?

gluPerspective(45.0f, //the FOV
(GLfloat)width/(GLfloat)height,0.1f,
100.0f // the farthest something can be seen, z limit.
);

The x/y limits will vary because of the size of the window it''s rendered to and the aspec ratio. If you want those constant, you will have to prevent the window from being resized.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!