Xith3D Canvas3D in offScreen mode

Hi all,

I have just started looking at Xith3D to potentially replace Java3D in our application, which runs primarily in 2D (Java 1.4.2 Fullscreen exclusive mode with active rendering) and we need to have some parts display in 3D. Our current implementation uses the offScreen mode of the Canvas3D to render into a back buffer image which gets drawn to the screen in the main render loop.

I saw that there is a Xith3D Canvas3D constructor which takes a boolean for offscreen mode, but I couldn’t quite figure out at a quick glance if the feature is fully implemented.

So, my question is (to avoid porting all our code just to find out it won’t work), can I have Xith3D render into an offscreen BufferedImage (or even better, a VolatileImage) for use in my 2D rendering loop?
And if yes, what are my chances that it will work faster than in Java3D (very slow, 2-5 FPS on a 2.6GHz P4)?

I’d appreciate any wisdom you guys could offer.
Thanks,
D

Does anyone know if this is possible?? :-/

You can use

view.getSnapshot(canvas, “some file name here”);

to save a file, in worst case you can then

read it back in with

java.io.File file = new java.io.File(“filename”);
try
{
javax.imageIO.read(bufferedImage, “typ”, file);
}
catch(IOException io)
{
io.printStackTrace();
}

rats…there is a method that return a bufferedImage

BufferedImage image = view.getSnapshot(canvas);