I have a 3D scene that displays the movements of some logged camera. Works fine, I like what I see. Now I want to make an overlay (200x150) in the top left corner of my screen (600x600) that actually shows what the camera sees in the scene.
How do I do this? I’m guessing I need to use GL_Projection instead of GL_ModelView, but I can’t get it to work. The code I have now removes the 3D scene and replaces it with my overlay, which is not what I want, obv.
The thing you want to do is simple to do. If the camera uses the same projection matrix, you can simply render the scene from the camera’s point of view into an FBO. Then simply render the FBO rendering on a quad on screen by using orthographic projection. You will push and pop the modelview and projection matrices. Refer to this tutorial which renders text on screen. You can replace the text rendering by a textured quad displaying your FBO result. http://www.lighthouse3d.com/tutorials/glut-tutorial/bitmap-fonts-and-orthogonal-projections/