I am attempting to capture part of the user screen, for instance a
window. I'm using the OpenGL screen capture example code to build on
so the following is my capture code. When I attempt to capture I get a
garbled screen so I know I'm not passing the right value somewhere but
I don't know
The solution is (using the original OpenGLScreenCapture project code)
to modify this statement in FrameReader.m:
glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 0, 0, mWidth, mHeight);
to
glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 100, 50,
mWidth+100, mHeight+50);
where
If you're specifically trying to mimic the screenshot-capabilties in Mac OS
X itself, you can use the `screencapture` command line utility, coupled with
an NSTask object in Cocoa. This is what I use in one of my apps, and what
Papaya does.
--
Steven Degutis
http://www.thoughtfultree.com/