Back Buffer Access

Started by
2 comments, last by Alan_Grey 19 years, 4 months ago
Hi all, does anyone know of a free engine which will allow me to get the contents of the back buffer? I'm doing a project which requires me to get the back buffer (as a bitmap I presume) without swapping, then I can run an algorithm on this data. Any help would be greatly appreciated - I'm running out of time to find an answer to this question :)
Advertisement
what do you mean by back buffer? Do you mean the desktop?
I think it involves HBITMAP and hWind...
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
SDL does page flipping in a way so that you are always accessing the back buffer (DirectX does too I assume since SDL is built off it). The main surface pointer is always your back buffer. There are two surfaces, but SDL manages them for you. So when you first create the main surface with SDL_SetVideoMode, you receive a pointer to the back buffer. Then, when you flip the buffers with SDL_Flip, SDL flips the surfaces in the background and reassigns your main surface pointer to the primary surface, which is now the back buffer since they've been swapped. And on and on.

So seeing that your main surface pointer is always your back buffer, I don't think I understand why you have to access the back buffer without flipping, when you can always access the back buffer without flipping. [smile]

Drew Sikora
Executive Producer
GameDev.net

Right...okay, well first off I'm using OpenGL. The problem I'm having is finding a graphics engine that allows you to access the back buffer. I know how to do it with OpenGL commands, but engines generally don't let you just use opengl commands. And none of the engines I've looked at (irrlicht, crystal3d, genesis3d, ogre) have in-built functions to get back buffer data.

Thanks.

This topic is closed to new replies.

Advertisement