PDA

View Full Version : stereoscopic screenshot



ellepi
03-06-2002, 05:38 PM
Hello everyone.
I'm trying to figure out how to take a screenshot of a stereo application. I'd like to capture both left and right components of the image so I can recreate the stereo effect later. How should I approach this problem? I have no experience with openGL http://www.opengl.org/discussion_boards/ubb/frown.gif but I'm willing to learn!

Thanks!

zeckensack
03-06-2002, 06:23 PM
I assume you take your screenshots with glReadPixels ... if not, well, you should.

Then you can simply do this:

glReadBuffer(GL_BACK_LEFT);

glReadPixels(blabla, pointer to memory buffer for left image);

glReadBuffer(GL_BACK_RIGHT);

glReadPixels(same blabla, pointer to memory buffer for right image);

ellepi
03-10-2002, 08:58 AM
Thanks for your help. I took your advice and applied it to a simple openGL sample I found and it worked.

Now for the new problem...
I want to take screenshots of apps that are not my own. ie. say I'm running openGL app Y, I want run my command simulaneously and have it save the screen. Is this possible? I tried it and I got a black picture http://www.opengl.org/discussion_boards/ubb/frown.gif

In essence, I want to gain access to another application's framebuffer. How can I do this?

Jambolo
03-10-2002, 09:06 AM
Originally posted by ellepi:
Thanks for your help. I took your advice and applied it to a simple openGL sample I found and it worked.

Now for the new problem...
I want to take screenshots of apps that are not my own. ie. say I'm running openGL app Y, I want run my command simulaneously and have it save the screen. Is this possible? I tried it and I got a black picture http://www.opengl.org/discussion_boards/ubb/frown.gif

In essence, I want to gain access to another application's framebuffer. How can I do this?

That is a very OS-specific thing and OpenGL can't help you at all. If you are using windows, you could just use the "Print Screen" button.

ellepi
03-10-2002, 04:35 PM
but I need two capture the left and right channels so that the stereo effect can be recreated later so something like the print screen button can't do that.

By the way, the system is running Solaris. I'm trying to capture images produced by gocad.

[This message has been edited by ellepi (edited 03-10-2002).]

john
03-10-2002, 07:32 PM
Howdy,

xv runs under solaris, and it has a capture thing. There are probably others... I vaguely remember somthing like xgrabscreen, or something?

I don't know if xv will capture quadbuffered stereo images, tho'. In fact, i suspect it wouldn't.

cheers,
John

ellepi
03-11-2002, 06:35 AM
I've checked out xv. It uses XGetImage to capture the screen, so it can't capture stereoscopic images. I'll take a look at the other programs though.

Gavin
03-13-2002, 01:42 AM
Press print screen quickly twice! :-)
j/k