I have my openGL scene rendering using the detach thread method
//This is at the end of my init method
SEL selector = @selector(preMainLoop);
NSThread *thread = [[NSThread alloc] initWithTarget:self selector:selector object:nil];
[thread start];
[thread release];
}
-(void) preMainLoop
{
while (isRunning) {
NSAutoreleasePool *loopPool = [NSAutoreleasePool new];
[self performSelectorOnMainThread:@selector(mainLoop) withObject:nil waitUntilDone:YES];
[loopPool release];
}
}
When I start getting touch events, I want to update my scene accordingly. But it seems like the scene is updating much faster than the iPhone is registering the touch events. For testing I'm trying to just drag a box around the screen based on the current position of a UITouch (updating the position during touchesMoved). I also have another box that moves independently, unaffected by touches.
The indepent box moves around smoothly, at a nice 60 frames per second. The touch box has 'jerky' movement which leads me to believe that the render loop is shoving out touch events or something to that affect.
Any help appreciated!