Skip to main content
gamedev.net
🔒 Locked

Back Buffer Access

Started by Alan_Grey Dec 1, 2004 at 12:29 PM 2 replies 1.1k views
Original Post
Alan_Grey
Alan_Grey
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 :)
PnP Bios
PnP Bios
what do you mean by back buffer? Do you mean the desktop?
I think it involves HBITMAP and hWind...
Gaiiden
Gaiiden
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
Alan_Grey
Alan_Grey
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.