Problem drawing offscreen with NSOpenGLView (gets drawn onscreen too)
Problem drawing offscreen with NSOpenGLView (gets drawn onscreen too)
- Subject: Problem drawing offscreen with NSOpenGLView (gets drawn onscreen too)
- From: "E. Wing" <email@hidden>
- Date: Thu, 11 Jan 2007 19:16:02 -0800
I am using a custom subclass of NSOpenGLView. In my drawRect: routine,
I have an if-else block like the following:
if([[NSGraphicsContext currentContext] isDrawingToScreen])
{
// Draw onscreen stuff
}
else
{
// Draw special printer representation
}
In my offscreen representation, I want to modify the presentation
slightly to make more sense for a printer. When I test this code by
selecting print and (select Preview from the Print panel), I notice
that my printer representation also gets rendered on-screen in my app.
Then when Preview finishes loading, my app goes back to normal and
renders the normal represenation again. I don't want this to happen.
How can I prevent this? (Is this supposed to even happen?)
Thanks,
Eric
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden