Screen and dib contexts

There are any solution to use the same context for direct screen render and Dib render?
Now I must to create the primitives in 2 contexts, one for renders to screen and another to render and save bitmap. It’s slow my application when there are a change in any primitive.

It’s possible to use only 1 render context or is possible to copy the primitives from one context to other?


2 contexts are needed because DIB and Window rendering are mutually exclusive and belong to the pixel format which can be set only once.

Of course, you are aware that DIB rendering is only supported by the Microsoft GDI software implementation, which could alone explain why your application is slow.

Still, you should have a look at wglShareLists.

Thank Kehziah for your attention, i has see the diferents functions wglcopy…, wglsharelist, … especifics of windows for OpenGL and i don’t found nothing to optimize my application.

Another time thanks.

Dib & back buffer can’t have a compatible Pixelformat, and render to DIB is not accelerated.
You can render to back and copy to dib using glreadpixels/gldrawpixels or use a pbuffer.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.