How to create a static background image in an OpenGL scene (GLUT)?

I am creating a scene, and I would like to show some static background image that would not change from how and what I do with the scene.

+3
source share
1 answer

This usually means that you can skip clearing your color buffer at the beginning of the scene, instead you will set the default spelling projection and render the quad with (-1, -1,0), (-1, + 1,0), (+ 1, + 1.0), (+ 1, -1.0) and apply texture to this square.

Then you can set up the necessary perspective projection and display everything you want in your scene. The square will serve as your background.

+5
source

Source: https://habr.com/ru/post/1756716/


All Articles