Jump to content
  • Advertisement
Sign in to follow this  
vgramanathan

OpenGL Can this be done in OpenGL?

This topic is 4033 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 am developing a game and I would like the game scene to be rendered in fullscreen like in a movie. This means I want some space above and below for details like score and some hint messages and I would like to have a perspective view in the middle part of the screen where my game scene is rendered. I am new to OpenGL and could anyone let me know how I can achieve this.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by vgramanathan
I am developing a game and I would like the game scene to be rendered in fullscreen like in a movie.

This means I want some space above and below for details like score and some hint messages and I would like to have a perspective view in the middle part of the screen where my game scene is rendered.

I am new to OpenGL and could anyone let me know how I can achieve this.
This can all be done in OpenGL (or just about any other graphics API) through proper manipulation of the viewport and view and projection matrices. In your example, you could set up the viewport and projection matrices to render the perspective view in the middle part of the screen, then switch to orthographic and render the UI elements at the top and bottom. Or, you could render the perspective view to the entire screen and then just block out the top and bottom using a UI background of some sort.

There are other ways to do it, but in short, the answer to your question is 'yes'.

Share this post


Link to post
Share on other sites
Just change the view frustum to match your perspective and viewing format, then change the projection to project to that center area of the screen. 3D APIs can easily render a scene in any rectangular shape in any position on the screen.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!