I was wondering; is it possible to acquire write access to the graphics card's primary buffer though the windows api, yet still allow read access to what should be there? To clarify, here is what I want:
- Create a directx device on a window and hide it. Use the stencil buffer to apply an alpha channel to pixels not written to by my code.
- Acquire the entirety of current display adapter's buffer. I.e. have a pointer to a buffer, in the current bit depth and resolution, that contains the current screen without whatever I drew to the screen. I was thinking of, instead of hiding my window, simply use a LAYERED window and somehow acquire the buffer before my window's pixels get blitted to it.
- Copy the buffer acquired in step 2 into a new memory location
- Blit my directx's device's primary buffer to the buffer built in step 3
- Blit the buffer in step 4 to the screen
- GOTO 2
So the end result is drawing hardware accelerated 3D directly to the window's desktop while still rendering other applications.