| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Thursday, December 5, 2002, at 03:25 PM, John M Coggi wrote:_______________________________________________Hi. I'm writing a multi-document OpenGL app and would like to allow the user to print the contents of a window. I've scoured the Apple Developer website and all the Cocoa dev sites I know and have found very little pertaining to printing and OpenGL views
in Cocoa. It seems like this would be a common thing for OpenGL applications to do. Geoff, John S., or perhaps someone else on this list, do you have any sample code showing how to print an OpenGL >> view?
The standard AppKit printing mechanism works by simply redirecting Quartz drawing, so printing of OpenGL views isn't automatically supported. What you can do, however, is grab a snapshot of your NSOpenGLView's contents as a bitmap by using glReadPixels() to read from the framebuffer. You can then print the resultant bitmapped image.
Troy Stephens
Cocoa frameworks, Apple
_______________________________________________
mac-opengl mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac-opengl
Do not post admin requests to the list. They will be ignored.
| References: | |
| >Re: Help with printing an NSOpenGLView (From: Troy Stephens <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.