PDA

View Full Version : screen and dib contexts



pj_index
05-20-2004, 06:52 AM
Hello
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?

Thanks
PJ

kehziah
05-23-2004, 03:09 PM
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.

pj_index
05-23-2004, 11:53 PM
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.
PJ

JamesDugalais
06-09-2004, 11:48 AM
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.
james