Howto call GL/GLU from Xith3D

Hi, I’m new to Xith3D.

I wish to use the glutBitmapCharacter to draw some text on the screen.
Browsing through the API, I think the correct way of doing it would be to create a Text2DAtom and a Text2DAtomPeer, then registering that with the RenderPeer, But looking through the source (renderNode() in View.java) I can’t see how that would work. So my question is how do you call GL/GLU/GLUT methods from Xith3D?

/bja

Hi,

Adding rendering atoms in Xith3D is non-trivial task, beause of you have to take care of OpenGL state management (state sorting, state caching, etc), rendering passes (atom sorting), resource caching etc.

As of Text2D, I personally use textured rectangles and draw text on textures using Java2D methods.

Somewhere on this forum there already were a discussion of Text2D/Text3D classes.

On the other hand, if you want to make an info window or overlay, you can use Xith3D UI subsystem (UIWindow) to embed Swing windows directly into your 3D scene.

Yuri

Oh I see. Well I’ve been using the UIOverlay class, and it works really well
too :slight_smile: I was just curious on how to do the low level stuff. Looks really messy :slight_smile:

/bja