Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

OpenGL clear sprite

I created 10 sprites on the window and now I want to clear only one sprite out of 10 sprites.
Now the function glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) clears the entire window of sprites, but I don’t want to clear the entire window of drawn sprites. What function should I use to clear just one sprite and not clear the whole window and redraw 9 sprites in the window?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

There is no such feature. Clear the screen, and redraw 9 sprites. Most computer games with moving objects clear the screen every single frame.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading