Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: screen and dib contexts

  1. #1
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    2

    screen and dib contexts

    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

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    354

    Re: screen and dib contexts

    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.

  3. #3
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    2

    Re: screen and dib contexts

    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

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    france
    Posts
    4

    Re: screen and dib contexts

    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
    James.
    jd@seemage.com
    http://www.seemage.com
    Shake Your CAD!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •