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 5 of 5

Thread: Blit between 2 hDCs

  1. #1
    Newbie Newbie
    Join Date
    Sep 2012
    Posts
    2

    Blit between 2 hDCs

    Hi guys

    Ok since I normally use DirectX and GDI+ it would be a bit odd for me to come here....but Im hoping someone here can help me out. I have an application (MS Flightsim X) where im trying to copy the bits from a ID3D9 surface to a image that is mapped to a 3D surface. The only link i have to this image is via its hDC. Original intended use was for drawing with GDI+ on that image. GDI+ is becoming too slow for my purposes....I tried BitBlt() and it turned things into a slideshow from 30 fps down to 0.1 fps for just a 512x400 image and it fried my graphics card.

    So...is there anything OpenGL provides or a way someone else here knows of that i can Blit between 2 hDCs without turning things into a slideshow?

    Thanks
    J.Bleeker

  2. #2

  3. #3
    Newbie Newbie
    Join Date
    Sep 2012
    Posts
    2
    Is there a way i can make my own bit block transfer between HDCs that can be faster than GDI BitBlt()?

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Apr 2009
    Posts
    600
    There is this: http://www.opengl.org/registry/specs...NV_DX_interoop and http://www.opengl.org/registry/specs...V_DX_interoop2 for GL and DX interoperations, but it is NVIDIA only. It allows for seamless operation between D3D and OpenGL. Btw, why are you not staying within the realm of D3D to do all the rendering? (Essentially this: http://stackoverflow.com/questions/4...in-directx-8-1 although the link says D3D8.1 the solution is for D3D9).

  5. #5
    Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    268
    You also _could_ try to SetPixelFormat on the window you need to read from and use glBlifFramebuffer while using separate read/draw HDCs with wglMakeCurrentRead. I say _could_ because setting pixelformat on a window that already is friendly with DX will almost certainly fail. Id try that if i was desperate though.

Posting Permissions

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