Jump to content
  • Advertisement


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

Ronin Magus

Perspective question

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

I'm still very new to openGL, but I'm working on it. What I'm wondering is how do I set a FLAT perspective? Not a 3d one. Here's what I'm trying to do. I'm trying to make an object modeller. There are Front, Side, Top, and Perspective in my view menu. For front, side, and top I want it to be 2d, just displaying the vertices on a grid. Perspective will be 3d. For any of you who have used a 3d modelling program, you know what I mean. The top, front, side views are 2d and there is no perspective calculated when the camera is moved. Anyways, I can handle the camera stuff, but I need to know how to make it to where the drawn vertices won't be drawn in 3d. Here's an example, say I have 3 vertices: Now, when the user clicks Front, I want this to be displayed: Regardless of where the camera is moved (rotation won't be possible in any view but perspective) I can handle all the vertex stuff I just need to know how to tell OpenGL to draw vertices in 2d instead of 3d. How is this done? http://roninmagus.hopto.org acronymfinder.com - Find any acronym you need! [edited by - Ronin Magus on August 11, 2002 7:55:18 PM]

Share this post

Link to post
Share on other sites
glOrtho is what you want to use, if youve been using glPerspective for these viewports, switch to glOrtho
such as


glOrtho(left,right,bottom,top,near,far); //all values are GLfloats


just play around with that, you should get what you want

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!