Hi
With the help of other java-gaming.org members I got my jogl swing project working.
However, on adding a menubar and other widgets I now have a flickering effect when I select a menu item from the menubar.
The code below is basically the SimpleJOGL project code, with the animator object now made a field member.
If I comment out the last line [ie; mAnimator.start(); ] the flickering stops. Unfortunately, so does my opengl rendering!
Has anyone seen this behaviour before? I did a search for “animator” and “flickering” but no previous posts.
Cheers
Graham
public void initialise()
{
initialiseCanvas();
initialiseAnimator();
// window listener
addWindowListener(new WindowAdapter()
{
@Override
public void windowClosing(WindowEvent e)
{
// run this on another thread than the AWT event queue to make sure the call to Animator.stop() completes before exiting
new Thread(new Runnable()
{
public void run()
{
mAnimator.stop();
System.exit(0);
}
}).start();
}
});
// start animator
mAnimator.start();
}