I am a total beginner to OpenGL and I have a question please.
I have an MFC application that has a lot of drawing using GDI. The rendering is getting heavy as I the number of shapes being drawn is relatively huge. I thought of migrating to OpenGL to fasten it a bit. Unfortunately, I cannot migrate the whole application at once, so I planning to make it incrementally.
Let’s assume I do the following in the OnPaint event handler:
I want to migrate DrawY for the time being and use OpenGL instead. I was able to convert all the drawing in it to be in OpenGL, but the problem now is integrating it in my code.
In DrawY (with OpenGL), I used double buffering (to maximize the speed) and at the end of drawing I called SwapBuffers to get the cached drawing on the screen. So, whatever was drawn in DrawX is erased and replaced by the buffer used in DrawY.
My question is: is there a way to draw on top of what was already drawn without replacing it? I know one way of doing so is simply not using the double buffering, but this way the drawing is slow again.
Thanks and sorry for my long post.