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?
CodePudding user response:
There is no such feature. Clear the screen, and redraw 9 sprites. Most computer games with moving objects clear the screen every single frame.