Annoying flickering when using JME with JOGL

Hi!



My problem is easily reproducible, launch the test called “JMEJOGLAWTTest” in the class jmetest.util.JMEJOGLAWTTest. Press a mouse button and drag the cube, you can see some flickering at the middle of the screen. In my game, it is extremely ugly and annoying. I have tried to fix this bug by several ways, I enabled Vsync, I removed the use of Animator, I modified the way of updating the input by doing it in a separate thread… Nothing worked. I thought it was a problem of double buffering but it is enabled, I have just checked it in debug mode in Eclipse. I think this bug has something to do with this:

http://code.google.com/p/jmonkeyengine/issues/detail?id=24

http://code.google.com/p/jmonkeyengine/issues/detail?id=35



I’m going to study the threading system of “Project Wonderland” that uses both JME and JOGL to understand the differences between them. It would be nice to fix all these bugs in the release 2.0 instead of waiting the release 2.1. Do you have any idea about the root cause of this problem?

It happens only when I move,then it doesn't come from the double buffering. Do you think using some AWT listeners directly on a canvas would change something to my problem?



Edit.: I read the source code of KeyInput, AWTKeyInput, JOGLDisplaySystem, JOGLAWTCanvas… The main difference with TUER is the fact I don't poll events. I have yet not found the root cause of this bug.

Activating the vertical synchronization if available should solve the problem of screen tearing as another programmer explained to me.