I am pretty new to openGL and I want to draw an animation in openGL.
For this I changed the openGL background using the code:
glClearColor(0.3f, 0.4f, 0.1f,1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
but the problem is this is clearing my whole window including the images I have drawn on this.
I just want to change the background color without clearing my drawings.
I am using openGL 2.1 with glfw.