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.
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.