How to clear a portion of an OpenGL window ?
- Create window of size 512x256.
- glClear(GL_COLOR_BUFFER_BIT), I suppose it clears the entire 512x256 area.
- Now how to clear only portion of the window ([0, 256]x[0, 256]) without drawing a dummy quad and set its color to glColorf(0, 0, 0); ?
Does glClear(GL_COLOR_BUFFER_BIT) clears the entire 512x256 region irrespective of the glViewport(0, 0, 256, 256) ?