[vtkusers] Offscreen Rendering

Chris Scharver scharver at evl.uic.edu
Fri Jul 11 13:14:53 EDT 2003


At 5:47 PM +0100 on 07/11/2003, Tim Hutton wrote:

>I don't know how to do this kind of thing on other platforms - anyone?

There has been a bit of traffic about this lately on the mac-opengl mailing list. I know it's doable in Cocoa, and it's just a matter of requesting the proper OpenGL pixel format. In Cocoa, a simple call to -[NSOpenGLContext setOffScreen:width:height:rowbytes] should take care of things, but a memory buffer into which to render must be specified Things get more complicated, however, if the OpenGL renderer in use does not accept hardware accelerated offscreen contexts. In those cases, a hidden window must be created, and its pixel data can be obtained using glReadPixels().

I'm not sure about the Carbon approach, but as both Carbon and Cocoa are internally using CGL, it should be similar.

Chris
--
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago
Ph: 312-996-3002   FAX: 312-413-7585
<http://www.evl.uic.edu/scharver/>



More information about the vtkusers mailing list