Single threaded AWT for OpenGL

We have been using native OpenGL for our application for some time,
we have been struggle with Java threading ever since, the OpenGL context
changes frequently with mouse movement and keyboard event, worse, we
also need timer, the timer also changes context.

There is a known bug in ATI openGL driver (fairly late ones), such that it leaks
a bit memory on each context switch. It also screws up the wglShareLists since
the context kept changing.

I have seen somewhere that there is a way to force awt on single thread, such
that all of its events are on the same thread, can some one tell me hoe to do that?

We do not use jogl, since the kernel is a separate dll, doing opengl all by itself,
this way the kernel can be used by MFC, various plugins as well as Java app.

– Youda

The ATI Mobility Radeon 9700 memory leak bug and workaround (in JOGL, but applicable to other applications) is described in the JOGL User’s Guide on the JOGL home page. There is no way to force the AWT on to one thread, though it typically does all of its work on the AWT Event Queue thread automatically. If you use JOGL then it will internally cause all OpenGL work to be done on this thread if you use the callback (GLEventListener) mechanism which improves stability on all platforms.