Using Xith3D

I have downloaded Xith3D but am prevented from running the bundled demo (cube test). I am assuming that it should work on any graphics card.

JOGL is running fine, as is Java3D (not that that matters) - that is not to say all JOGL demos work but at least I have some polys displaying which is a start.

When I try to run it, I get this:

[divzero@localhost demo]$ java -Djava.library.path=../third-party/jogl/linux -Xmx50m -Xms20m -classpath ../src/com/xith3d/test:../third-party/jogl/linux/jogl.jar:../third-party/vecmath/vecmath.jar:../third-party/xith/xith_utilities.jar:../libs/ com.xith3d.test.CubeTest
net.java.games.jogl.GLException: Error making context current
        at net.java.games.jogl.impl.x11.X11GLContext.makeCurrent(X11GLContext.java:141)
        at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:111)
        at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
        at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:119)
        at java.awt.Component.setBounds(Component.java:1644)
        at java.awt.BorderLayout.layoutContainer(BorderLayout.java:683)
        at java.awt.Container.layout(Container.java:835)
        at java.awt.Container.doLayout(Container.java:825)
        at java.awt.Container.validateTree(Container.java:903)
        at java.awt.Container.validate(Container.java:878)
        at java.awt.Window.dispatchEventImpl(Window.java:1564)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
net.java.games.jogl.GLException: Error making context current
        at net.java.games.jogl.impl.x11.X11GLContext.makeCurrent(X11GLContext.java:141)
        at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:111)
        at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
        at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:196)
        at net.java.games.jogl.GLCanvas.display(GLCanvas.java:91)
        at net.java.games.jogl.GLCanvas.paint(GLCanvas.java:102)
        at sun.awt.RepaintArea.paint(RepaintArea.java:180)
        at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:339)
        at java.awt.Component.dispatchEventImpl(Component.java:3586)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Exception in thread "main" net.java.games.jogl.GLException: Error making context current
        at net.java.games.jogl.impl.x11.X11GLContext.makeCurrent(X11GLContext.java:141)
        at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:111)
        at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
        at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:196)
        at net.java.games.jogl.GLCanvas.display(GLCanvas.java:91)
        at com.xith3d.render.jogl.RenderPeerImpl.makeCanvas(RenderPeerImpl.java:61)
        at com.xith3d.test.CubeTest.<init>(CubeTest.java:98)
        at com.xith3d.test.CubeTest.main(CubeTest.java:540)

As I posted http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1059583460;start=0#2 I am only using a software renderer in Linux however it also fails in Windows and I have hardware 3d working there.

Thanks,

Will.

Not sure if this is related to the issue you are having, but I had to make sure I had JDK 1.4.2 in order for it to run.

oh. I only have sdk1.4.0 (I also have jre1.4.1 but I don’t suppose that helps either).

I guess that might help huh? Did you experiance problems on these older versions too?

Cheers,

Will.

I tried it first with 1.4.1 and had problems. I upgraded to 1.4.2, and it worked fine. This is on SuSE Linux btw.

sounds good to me gets hopes up again

Future 1.4.x support would be nice, end users are a pain to explain such things to… But hardly a need for it just yet I guess.

Will.

how duss transparency work?

Shape3D shape = new Shape3D();
Appearance a = new Appearance();
a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_FILL,PolygonAttributes.CULL_BACK,0));
TransparencyAttributes transparencyAttr = new TransparencyAttributes(TransparencyAttributes.BLENDED, 1f);
a.setTransparencyAttributes(transparencyAttr);
a.setTexture(textureWood);
Geometry g = createDoubleCube(0f,0,0,0.5f,false);
shape.setAppearance(a);
shape.setGeometry(g);
tf_2.addChild(shape);

– i bet i got this well wrong :slight_smile:

Transparency is not perfect yet in Xith3D, currently it only supports it if the vertex alphas or texture contains and alpha channel. Setting the transparency at the shape level like you are trying to do is not yet working. But if it was you would not want to use 1.0 as that would mean fully transparent.

yer just playing with it… i was seeing if all the boxes would dissapear :). i got the new CVS to build today so i am happy there :slight_smile: top stuff.

how do the volume shadows work? i want to see that in action winders how simple it is to get working :slight_smile: