Using JOGL with Xith3D

Hi all. I’d like to know if there is any way to use JOGL to implement some features (like something not yet implemted in Xith3D) while taking advantage from Xith3D.
I tried somethink like this to get the GL object:

//…
RenderPeer rp = new RenderPeerImpl();
CanvasPeer cp = rp.makeCanvas(null, 800, 600, 32, false);

Canvas3D canvas = new Canvas3D();
canvas.set3DPeer(cp);

GLCanvas c = (GLCanvas) (((CanvasPeerImpl)cp).getComponent());
GL gl = c.getGL();

But I can’t figure how to use JOGL together with a “view.renderOnce()” invocation.
I want to have something like this:

GLUT glut = new GLUT();

while(true) {
glut.glutBitmapString(gl, GLUT.BITMAP_TIMES_ROMAN_24, “text”);
// ??
view.renderOnce();
}

It (obviously) doesn’t work. It was just to give an idea of what I mean.

Is there any way to write JOGL code to create some geometry (using a display list, for example) and attach it to the Xith3D scene graph?

Thanks,
GPV

In the current version of Xith3D, it is not possible. There are some thoughts on how to allow this, and I remember that this was discussed approx. a month ago in this forum - I just was unable to find the thread fast. Custom OpenGL code/custom shaders were mentioned by David Yazel, as I remember, in conjunction with comments on multipass rendering and Quake level rendering [I hope upderstood that right].

Yuri

Thanks.

GPV

I want to use the scenegraph, I have written my own scenegraphs in the past, but would prefer to use xith3d because of it’s versatility and it uses jogl, not proprietary J3d (you know what I mean), etc.

So, Since I have a lot of ogl code in C++ that i’ve written for games in the past, and my own OGL code from java ports I’ve done, what is the best way to get the GL from the CanvasPeerImpl before the renderer determines that it’s all null…
what I’ve done is create a Draw3dsGrid object (from one of the GameTutorials tutes) and extended it from Geometry.

Now, its constructor is Draw3dsGrid(GL gl), but when I run the code that I have placed in Xith3dTest(just to try it out and see where it needs to be so I can know where my jogl implementations should go, and if it will actually work), it is null when I do CanvasPeerImpl.getGl() or CanvasPeerImpl.getGlu()… they are null until

ok, back up a second, actually, i went and got the Xith3DTextureTransformTest from the xith3d.test directory… so back to the post it isn’t until runTest that the CanvasPeerImpl is actually possibly not even null, however the getGl and getGlu are null.

Is there a way to do something with any of this?

Sorry, this is so jumbled, it’s 6 am and I’ve been up 36 hours working on a project and now I’m trying to relax by coding game stuff. It’s entirely possible that I don’t have all of the information that you need or I’ve forgotten to post something, please let me know if I did.

On to what I have been doing: I’ve been coding with Nodes directly from the xith3d library and using as much from this library as possible without affecting any of the code, so far, so good, but it’s quite frustrating to not have a direct hierarchy via the inherent properties that come with a scenegraph. I’ve made my own scenegraph in the past based off of the Bas tutorials and the opengl for games book and have used these basis’ for almost two years.

(just a little vent:))
Any clue as to when this might be completed?

thank you,
timo
Sr. Java Server Pages Developer 4 years