From: Kenneth B. R. <kbr...@al...> - 2002-11-07 16:26:38
|
> The scene is rendered without any problem, and I could move through the > scene smoothly (I use glTranslatef and glRotatef to do this). The problem > comes when I click the mouse button -- when releasing the button, part of > the objects (but not all of them) flashes, while the floor plane and skybox > remain still (I never found them flash). The flash doesn't occur everytime, > but is quite frequent. Have you thought about the multithreading occurring in your program? Usually with a GLAnimCanvas all of the OpenGL rendering occurs in the animation thread (driven by the GLAnimCanvas). However all AWT events like mouse presses are dispatched on the AWT event thread. It is usually best to simply set up state in the AWT event handler which is consumed by the animation thread later. See the JCanyon demo (use Google) for an example of handling mouse and keyboard presses properly. |