Going around "display:"
Going around "display:"
- Subject: Going around "display:"
- From: David Newberry <email@hidden>
- Date: Sat, 18 May 2002 15:39:05 -0700
Hello all,
I am working with a subclass of NSView (specifically NSOpenGLView). It's a
simple game, and I want to invoke OpenGL drawing code from a place in the
program other than my NSOpenGLView's subclass' drawRect: method. (Having
it there just doesn't make sense in how the flow of my program is set up.)
To get around having drawing code in said method, I have the following
code:
[myView lockFocus];
[self drawMethod];
[myView unlockFocus];
What I'm trying to do is probably fairly obvious. "myView" is my NSView
subclass, and this code is being called from the object containing the
drawing code in the "drawMethod" method. It seems that the code is being
called properly (from a timer), but the NSOpenGLView is not being drawn to
the screen... only if I force the drawRect: method to be called does it
update on screen. Am I doing something incorrectly, or overlooking
something else I need to call?
Thanks in advance,
-David Newberry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.