Link to home
Start Free TrialLog in
Avatar of Xavior2K3
Xavior2K3

asked on

OpenGL Double Buffering

Hi,

I'm having a problem with OpenGL double buffering. I'm using JOGL so I'm not sure if this is a general OpenGL question or a JOGL one!

I'm noticing that when I move objects around I can sometimes see the scan lines being rapidly drawn. There is no flickering as such, as i think i have double buffering on. I set double buffering in 2 places. Once in the capabilities (capabilities.setDoubleBuffered(true)), and once in the initialisation (glEnable(gl.GL_DOUBLEBUFFER)). Are these the only 2 things you need to set for double buffering? I've noticed some code using a swapbuffers function, is this something thats needed?

Any ideas why I'm sometimes seeing these scanlines being rapidly drawn?

Kind Regards,
Michael
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Are you embedding JOGL into a Swing app using GLJPanel?  Or doing a standalone OpenGL app with no GUI elements?
Avatar of Xavior2K3
Xavior2K3

ASKER

Yes I'm using swing elements and I'm adding the GLCanvas it to a standard JPanel. Could a GLJPanel be the answer? I've never heard if it before! :)
SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for all of your input. I really think this is a JOGL issue. I'm not sticking with Java for too much longer so i hope i wont be plagued with this problem in the future!

Thanks again!