나는 내 OpenGL을 장면은 내가 터치 이벤트를 받기 시작하면OpenGLES 앱에서 '끈적'한 터치를 해결할 수있는 방법은 무엇입니까?
//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];
}
}
, 나는 그에 따라 내 장면을 업데이트 할 분리 스레드 방법을 사용하여 렌더링합니다. 그러나 아이폰이 터치 이벤트를 등록하는 것보다 훨씬 빨리 장면이 업데이트되는 것 같다. 테스트를 위해 UITouch의 현재 위치 (touchesMoved 동안 위치 업데이트)에 따라 화면 주위로 상자를 드래그하려고합니다. 나는 또한 독자적으로 움직이는 다른 상자를 가지고 있으며, 접촉에 영향을받지 않습니다.
indepent 상자는 초당 60 프레임으로 매끄럽게 움직입니다. 터치 상자는 '멍청한'움직임을 가지고있어 렌더링 루프가 터치 이벤트 나 그와 같은 영향을 미치고 있다고 생각하게 만듭니다.
도움을 주셨습니다.