PDA

View Full Version : Framebuffer difference



[erik]
03-10-2002, 06:43 AM
Hello

I am trying to write a small program, which runs in the background and reads the framebuffer generated by other applications.
I need to first read the whole framebuffer and then detect the subsequent changes at a rate of ca. 15-25 fps. I would be very thankful for any hints:

1) If glReadPixels is slow, what should I use instead?

2) Is there a way to figure out the difference between the front and back buffer with a boolean operator using the GPU, so there would be no need to read the whole framebuffer?

3) If this operation can't be carried out effectively when using OpenGL, does DirectX make any difference?

Thank you.

Jambolo
03-10-2002, 11:45 AM
This is an OS question and there is nothing in OpenGL that will help you (beyond glReadPixels).

zeckensack
03-10-2002, 06:40 PM
You can't use OpenGL to access the contents of a window from another application. Not even with glReadPixels. You could attach an OpenGL context to it somehow, but that won't guarantee you buffer access. And if you actually manage to use OpenGL on that window, it will fight with the other application's output, never cooperate.

[erik]
03-11-2002, 12:53 AM
I supposed this http://www.opengl.org/discussion_boards/ubb/smile.gif I know that this is not the right forum, but what about DirectX? Is it possible to read out the framebuffer using DirectX calls?

richardve
03-11-2002, 01:05 AM
[friendly hugmode]

Would you mind not to say such dirty words?

You can ask questions about <dirty>X at the forums of www.gamedev.net (http://www.gamedev.net) , www.flipcode.com (http://www.flipcode.com) and/or somewhere at one of the many great sites from our big friend Bill.

Bye!

[/friendly hugmode]

zeckensack
03-11-2002, 01:05 AM
What's this 'DirectX' you keep mentioning? Never heard of that ...

This is the OpenGL board!

T2k
03-11-2002, 01:21 AM
#define <dirty> Direct http://www.opengl.org/discussion_boards/ubb/smile.gif

all you can try to do is to use GDI(you will fall into software mode, i think) to access the buffer, because you cannot connect an OpenGL RC to <dirty>3D and if you try it can happen that you disconnect <dirty>Draw from <dirty>3D, dont now, i dont use <dirty>X, but the other case: using <dirty>Draw could maybe work, ...

but i think thats not you problem ?!? what you need to do is to use the command glCopyTexImage2D ... and then draw the obtained texture to a DIB, that maybe work, but if it will be faster, dont know ?!?

[This message has been edited by T2k (edited 03-11-2002).]

[erik]
03-11-2002, 01:58 AM
Hey I don't like the guy either but I have no choice if my application runs only under Windows. I'd prefer it running on Linux but ...

[erik]
03-11-2002, 02:05 AM
Thank you T2K for your intension to help http://www.opengl.org/discussion_boards/ubb/smile.gif
I'll think in this direction.

richardve
03-11-2002, 04:53 AM
Originally posted by T2k:
<dirty>3D .. <dirty>Draw ..

AFAIK <dirty>Draw doesn't exist anymore with <dirty>X8 and 9 since it's called <dirty>Graphics now.

And AFAIK the methods for accessing the framebuffer with <dirty>Graphics have been removed.

(not really sure about that since I've stopped used <dirty>X after version 6)