Is it possible to get a screenshot of an SCNView? I'm trying with the below code, but it always comes out white...
NSRect bounds = [window.contentView bounds];
NSImage *screenshot = [[NSImage alloc] initWithData:[window.contentView dataWithPDFInsideRect:bounds]];
It works fine when the view is a standard NSView...
In OS X v10.10 and iOS 8, SCNView
adds a snapshot
method, so you can get an NSImage
(or UIImage
) out of it much more easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With