List of usage examples for javax.media.j3d ImageComponent FORMAT_RGB8
int FORMAT_RGB8
To view the source code for javax.media.j3d ImageComponent FORMAT_RGB8.
Click Source Link
From source file:SwingTest.java
/** * Initialize an offscreen Canvas3D./*from www .ja v a 2 s . c o m*/ */ protected Canvas3D createOffscreenCanvas3D() { offScreenCanvas3D = createCanvas3D(true); offScreenCanvas3D.getScreen3D().setSize(offScreenWidth, offScreenHeight); offScreenCanvas3D.getScreen3D().setPhysicalScreenHeight(0.0254 / 90 * offScreenHeight); offScreenCanvas3D.getScreen3D().setPhysicalScreenWidth(0.0254 / 90 * offScreenWidth); RenderedImage renderedImage = new BufferedImage(offScreenWidth, offScreenHeight, BufferedImage.TYPE_3BYTE_BGR); imageComponent = new ImageComponent2D(ImageComponent.FORMAT_RGB8, renderedImage); imageComponent.setCapability(ImageComponent2D.ALLOW_IMAGE_READ); offScreenCanvas3D.setOffScreenBuffer(imageComponent); return offScreenCanvas3D; }