I have a 3d scene drawn out in Opengl, the camera is allowed to pan around the scene. How do I go about adding 2d shapes to the window that will be unaffected by the camera moving?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Generally this is done by drawing in two steps. Assuming that you would like the 2D shapes to always be “on top” of scene like a GUI, I would render your 3D scene, then use glOrtho2D and draw your shapes. You’ll probably want to also disable depth testing. Be sure to set back up for your 3D each frame.