>>How 3D Studio solves this?<<
Kinetix (at that time) “created” this extension named GL_KTX_buffer_region for this purpose.
It’s ill defined but a de facto standard. (IMO an ISV should not define OpenGL extensions, let the IHVs do that. It didn’t even make it onto http://oss.sgi.com/projects/ogl-sample/registry/)..)
Look for the WGL_ARB_buffer_region which should be defined a little cleaner.
If you don’t have this extension in your OpenGL implementation, you might look at the GL state which was active during glReadPixels and glDrawPixels. Disable everything which could prohibit a simple copy operation.
Another way would be to keep the backbuffer as backing storage, restore the image with glCopyPixels and render the modified object into the frontbuffer with depth-writes disabled. The object will flicker, but it’s modified anyway.
Another completely different approach is to use an overlay plane to draw a manipulation gizmo or wireframe view of the selected object. But this needs a board with overlay plane support.
[This message has been edited by Relic (edited 01-03-2001).]