Netbeans with JOGL won't draw in designer + error

When I try to add a GLJPanel in Netbeans 6.0 Beta 1 w/ JOGL something strange happens with the window rendering: I cannot see an object to place (no black GLJpanel or GLCanvas square like the screenshots show), and if I add it in and switch from designer view to source view and back again, the window will not redraw and things will look all messed up until I remove the object.

I also can view the following exception (trimmed):


java.lang.NoClassDefFoundError: Could not initialize class com.sun.opengl.impl.windows.WindowsGLDrawableFactory
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
...

	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
[catch at]
...
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

I can compile and run the demos, however. I’ve installed it on two computers and followed the directions, and still have this problem.

Help!
Thanks.

Edit: Another error (perhaps more telling):


javax.media.opengl.GLException: Unable to create OpenGL context for device context 0x490109d2
	at com.sun.opengl.impl.windows.WindowsGLContext.create(WindowsGLContext.java:122)
	at com.sun.opengl.impl.windows.WindowsGLContext.makeCurrentImpl(WindowsGLContext.java:150)
...

And the Tools/OpenGL Capabilities dialog has no information in it.

Further Edit: Since the problem seemed to be the JVM Netbeans is using couldn’t find the methods supplied in the JAR or perhaps DLL files, I stuck them all over the place in my JDK folders and now things seem to work. Odd, that.

Thanks for the report. We will have a look this weekend. Could you please give some more information of your PCs OS, GFX card, driver(-version) and JDK(-version)?

Hmm, you should avoid doing this, since it might break WebStart deployment of other JOGL jars and can cause strange behaviours under some circumstances. You can keep it this way for now, but be aware, that this is problematic and the spread out JARs and DLLs need to be deleted again, when the error is tracked down.

[quote]Thanks for the report. We will have a look this weekend. Could you please give some more information of your PCs OS, GFX card, driver(-version) and JDK(-version)?
[/quote]
Sure. I tested it on Windows XP SP2 and Vista Ultimate. Nvidia GeForce 7800 GS and Intel Media Accelerator 950 (some integrated card). JDK is 1.6.0.

I’m not sure of the JOGL version; it was the one obtained by getting the download manager from https://netbeans-opengl-pack.dev.java.net/, and I suppose must be whatever version it currently supplies.

Also, the problem seems to have re-manifested itself

Intel cards are known to have issues with OpenGL and JOGL. I suspect there might be problems with the creation of pbuffers, which were needed in the past to set up the internal GL context in Netbeans - I don’t know if this is still the case. If so, this might be related to your problem.

Hm, I suppose it’s possible, but the fact that I had the same problem on the Nvidia card seems to indicate to me that it’s something else. I kept getting NoClassDefErrors, which made me think that Netbeans wasn’t giving Java the proper JOGL/OpenGL libraries. And it went away for a while when I put DLLs in directories in the JDK, though perhaps a combination of things fixed it, as it now doesn’t work again…

When you guys install the Netbeans beta and the update manager, all you have to do is download the relevant OpenGL plugins and everything works?

Hi 100DashSix,

Exactly, you don’t need anything else.

This bug has been fixed in svn but the fixed module isn’t yet available via Update Center. I will upload the new build tomorrow.

Wow, that’s good service! I’ll try updating tomorrow, then. Thanks.

The new build is now available. This is no release build but the first release is coming soon :wink:

This build adds an fallback-mode for systems without pbuffer support and an improved GLSL editor (with navigator, code folding, better syntax coloring, auto completion and other gimmicks). It also contains around 100 ready to run JOGL demo projects.

known Bug:
please don’t open the GL Capabilities Viewer while you are in the Form Designer (Matisse) with an GLCanvas or GLJPanel in design mode. The GL Component in the Form Designer will crash.

Tell us if its working

-bienator

I’ve updated and everything seems to now work fine! Good Show.

Now to get down to the issue of actually using OpenGL…