PBuffer canvas available, useful with swing

Hello!

I’ve made a first draft (already usable) of a PBuffer canvas peer.
There is also a PBufferCanvas3D for use with a View, and a
screenshot of all this in a swing application.
See : http://nicolas.brodu.free.fr/xith3d/

This CanvasPeer renders into an Image made from a
pbuffer, so it uses hardware acceleration.

Note that since the pbuffer is is copied back to an
image in main ram, this is probably not what you want
to make fast games.

On the other hand, if all you want is visualize large scenes
requirering HW rendering to compute, and with a nice Swing
interface all around, this maybe worth a look.

The canvas only renders the scene when updateImage is called.
It will not render the scene when View.renderOnce() is called.

TODO: Many improvements.
Main idea would be to write directly to a VolatileImage. Indeed, as it is now,
the rendering happens on a pbuffer in vram. But instead of a direct vram->vram
operation as could be expected with a VolatileImage, the BufferedImage used here
does vram->ram and then will do ram->vram again when the user displays the image.

Happy hacking!
Nicolas

Excellent, in fact I was making a complete switch over LWJGL for this feature alone, way to go dude ;D
Can we have this in the official build Yuri?
Please please please
/me jumps around Yuri begging for this feature

Hmm after thourough consideration what I’d like to have is;
renderToImage() function that does return an ImageComponent2D which should be more handy at creating textures than a BufferedImage.
I need this feature so badly in my true reflective cube mapping, where I render the scene six times, using the lookAt() function to capture a cube into 6 different ImageComponent2D or BufferedImages and then update a certain Shape’s Appearance’s TextureCubeMap…
I’d like to hear what would Yuri’s approach be to accomplish the described method as fast as the hardware allows

I will reply in “True reflection using Xith3D” (http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1078125295) thread, because of I posted there the basics or multipass rendering.

Yuri