Thank you But there is no way to call "drawRect" manually? Maybe to call it manually and then tell NSView that it had processed that method? I just found out why in Apple sample code CIVideoDemoGL drawRect could be called directly - because the drawing job was delegated to the OpenGL, and drawn by OpenGL. When it's done using Quartz2D, the direct call of drawRect doesn't work. I needed that just to simplify code - that would allow me to avoid synchronization (im getting a frame, calling drawRect and waiting till it finishes - and can safely "reload" this buffer with a new picture).
Also i wanted to ask, if that is a wrong thing to do - to call [myView display] from the displaylink, instead of waiting for its turn in Event Loop's queue. 2011/5/10 koko <k...@highrolls.net>: > [myCustomView display] > > will call drawRect outside of normal run loop processing, i.e. it happens > right now. > > > > > On May 10, 2011, at 10:26 AM, Nick wrote: > >> helloo. Can someone explain please, when an NSView's call -drawRect >> (being called manually - not by a framework) actually initiates >> redrawing of the frame and displaying everything that it had drawn, >> and when this call "doesn't initiate a thing"? >> >> in some Apple samples is see that often to display a movie (a set of >> frames) onto the view this method is being called manually from the >> display link that is a part of NSView. >> >> When i am calling [myCustomView drawRect:NSZeroRect] from somewhere >> else than NSView's subclass' implementation code (a display link is >> not located inside NSView's subclass implementation) it doesn't work. >> I am obliged to use [myCustomView setNeedsDisplay:YES] which requires >> adding synchronization and the code becomes kind of messy. >> >> Is there a way to call drawRect and make sure the view actually redraws >> itself? >> Thanks. >> _______________________________________________ >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) >> >> Please 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: >> http://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net >> >> This email sent to k...@highrolls.net >> > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com