bitmap creation using opengl

I want to create bitmap filled with color of size 700x700.

can anyone tell me how to go about it.



I guess you want to dump the colorbuffer of the framebuffer into a location in RAM.

The most reliable solution is the create a FBO (FrameBuffer Object) with a texture for the colorbuffer and dump the texture back into RAM.

If FBO is not available on your graphics card, you are stuck with glReadPixel() on the default framebuffer which can be problematic has the default framebuffer is affected by the pixel ownership test (ie if a part of your window is covered by another one, you could have garbage in the covered part).