Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Rendering an overhead display

  1. #1
    Newbie Newbie
    Join Date
    Dec 2012
    Posts
    1

    Rendering an overhead display

    I'm trying to render a png image for my foreground. I have made a quad and added my png as a texture on my quad. The quad is 3.2 X 4.8 (iPhone dimensions is 320 X 480px). I don't think the correct way to display my quad full screen is to scale and translate it... i'm wondering what the correct way to do this is.

    Also, I'm wondering how to keep the quad full screen independently of the camera (view) position? Basically to treat my foreground as an overhead display independent of the model and view...

    Thanks!

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,097
    You need to save your projection matrix then do an orthogal projection (see gluOrtho2D) and render you quad that restore your normal projection matrix (ie camera). You will probably want to enable alpha blending as well. THis is not enabled by default.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •