sun.java2d.noddraw

Hello,

I am getting increasingly confused about the “sun.java2d.noddraw” property. I understand I need to set it to ‘true’ for all JOGL applications (I assume this hasn’t changed with the latest JSR231 beta release?). However, my multiplayer game is always in windowed mode and uses a Swing Interface in both pre and post game phases. Disabling setting “sun.java2d.noddraw” to “true” is bound to (severely?) slowdown all Swing components, right? I don’t really want to make the Swing GUI less responsive. Does anyone know if I can change this argument dynamically at run-time? Say, enabling DirectDraw while JOGL is inactive and disabling it when I’m about to load and init a GLCanvas? I would test it myself, but I’m developing this on linux.

Thanks,

KAding

The idea is to disable the DirectDraw pipeline and enable the OpenGL pipeline. so you don’t lose hardware acceleration. That said, I don’t notice any slow down in typical Swing UIs without hardware acceleration enabled anyway.

The sun.java2d.noddraw property only has an effect on Windows platforms. It has no effect on Linux or Mac OS X platforms though it doesn’t hurt to specify it. I have never seen any significant Swing slowdown on Windows by switching to use the GDI pipeline (which is what -Dsun.java2d.noddraw=true does). The OpenGL pipeline is only enabled by requesting it directly via -Dsun.java2d.opengl=true. I wouldn’t recommend trying it with any release earlier than Mustang, although the Java SE 5 implementation on Mac OS X will probably have a more robust Java2D/OpenGL pipeline than on other platforms.

Ah, thank you for the explanation. I was doing some googling and had a very hard time figuring out what exactly ‘sun.java2d.noddraw’ did and how it affects performance.