OpenGL stops animating after title bar is dragged
I created a simple test app that just rotates a white circle in front of a blue background. It works fine until I drag the title bar of the window around. Within a second or so of dragging, the animation stops. I know the draw function keeps getting called, because I'm seeing FPS info in the logs. What could cause animation to stop, though?
If you're using an NSTimer, make sure you add it to NSEventTrackingRunLoopMode:
edit: actually, if you're seeing that your draw routine is being called, NSEventTrackingRunLoopMode probably isn't the issue... though it's still something to keep in mind.
Code:
[[NSRunLoop currentRunLoop] addTimer:refreshTimer forMode:NSEventTrackingRunLoopMode];edit: actually, if you're seeing that your draw routine is being called, NSEventTrackingRunLoopMode probably isn't the issue... though it's still something to keep in mind.
Are you swapping the buffers from inside the drawing function? If not, it could be that the update function you're using to actually display your drawing isn't getting called.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Animating 3D Models | Josh | 18 | 8,176 |
Jul 15, 2003 04:26 AM Last Post: Holmes |
|

