Results 1 to 3 of 3

Thread: get back buffer DC

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000

    get back buffer DC


    I'm trying to use GDI function(ex BitBlt) at back buffer. However, I could not find any information about getting HDC for back buffer. When I call wglGetCurrentDC, it seems like I got DC for front buffer.

    How can I get HDC for back buffer?

    Any help will be appreciated.


  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000

    Re: get back buffer DC

    You can not use GDI functions with OpenGL.
    That's a limitation and you can not do anything about it...

    If you want to access the Front or Back buffer, you have to use glReadPixels/glDrawPixels after having selected your buffer.

    What do you want to do exactly ?


  3. #3
    Junior Member Newbie
    Join Date
    Feb 2000

    Re: get back buffer DC

    I'm doing some unusual thing.(Everyone thinks he's doing unusual thing

    I made an openGl wrapper which converts Quake3 into stereoscopic Quake3.

    With the wrapper, I intercept some OpenGl calls and render twice at different viewpoints. Now I got an Side-by-Side image where a Left-eye-viewed image is in the left half of the screen and right-eye-viewed one in the right half.

    I'm using VRJOY, a 3D glasses which needs a interleaved stereoscopic image. That is, Left image should be in add lines and Right image in even lines.(or vice-versa).

    I have to make an interleaved image from side-by-side one.

    I tried glCopyPixel but it was very slow. Also, I tried stencil buffer but it seed like most of opengl accelerator does not support stencil buffer. Software stecncil operation was very slow.

    So, I tried to use "BitBlt" or "stretchblit" to make an interleaved image. To do this, I need to access the back buffer.

    I also tried to use DirectDraw surface because DirectDraw's Blit is very fast and most of VGA card supports hardware blitting. However, when DDraw take over the full screen, I could not accss the OpenGL's front(back buffer too) buffer. I think the front buffer DC is lost when DDraw prevails.

    That's what I'm doing. I thought it would be easy to make an interleaved image once I have a Side-By-Side image. Now I'm feeling shortage of OpenGL function. Well.. anyway basically OpenGL is just for 3D. I think 2D support should be done by O/S.

    Is there anyone who can help me with this?
    I can offer some money.


Similar Threads

  1. FBO vs back-buffer?
    By ugluk in forum OpenGL: GLSL
    Replies: 7
    Last Post: 01-05-2010, 05:05 AM
  2. Replies: 5
    Last Post: 02-10-2006, 12:56 PM
  3. glReadPixels read the front buffer or the back buffer?
    By in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 09-16-2004, 11:15 AM
  4. Fast copy from back buffer to back buffer?
    By robosport in forum OpenGL: Advanced Coding
    Replies: 19
    Last Post: 03-04-2004, 10:12 AM
  5. How to get HDC for back buffer
    By Jeff in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 04-03-2000, 10:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean