xith3d and lwjgl/jogl dependencies

I was curious about the ‘xith3d -> jogl/lwjgl’ dependency.

I am really only interested in using jogl with xith3d.

If I just use the binaries things work great. However, I went ahead and brought the xith3d source into my project and noticed that some of the code has "lwjgl’ dependencies in it.

As an example, “Shape3D.java” has the following import:

 import org.lwjgl.opengl.*;

I am building and running a small example that uses Shape3d. When I don’t have the xith3d source included in my project everything works great. If I do include the source, I get exceptions to the effect that it is expecting the “org.lwgl.opengl.*” data (which makes total sense).

How come this “lwjgl” dependency doesn’t seep to exist when not building from the source. (Are there two implementations of Shape3D somewhere or something?)

Any help appreciated,

Greg

general question first:

It doesn’t complain that lwjgl doen’t exist because when you are compiling somthing, it only needs to know where classes that you are using are (and you arn’t using lwjgl by the sound of it).

If infact Xith3D needed that lwjgl class to operate then an exception would be thrown at runtime when the JVM tries to dynamically load the class (because it can’t find it).

However if the JVM never needs that class (lets say because you never actually call any Xith3D code which uses a lwjgl class) then no excpeitons will be thrown.

However, when compiling the Xith3D source, the compiler hits that import statements and bails out because it can’t find lwjgl.

Specifically to xith:

I don’t know why the com.xith3d.scenegraph Shape3D object would import lwjgl, maybe it’s a bug. I just removed those two lines on my local copy and it doesn’t compile as there are a few methods using it. If you think LWJGL should be removed from that code, I suggest you submit an Issue so it can be looked at.

Will.

This is known issue. We should remove LWJGL dependencies from everywhere except [possibly future] LWJGL renderer code. For building, appropriate separate targets should be created and I would prefer to make JOGL target default.

BTW, this is a minor issue, besides sometimes really annoying…

Yuri

Great. Thanks for the info. Really wanted to just make sure I wasn’t losing my sanity.

Greg