Hi, I have rewrited the postswap() of a canvas 3d to collect a bufferedImage of the scenario and then sent it to another aplication.
The program is working but im having a problem with the performance: I discovered that the method readRaster(Raster r) from graphicsContext3d takes 200ms in Suse Linux 1,8Ghz to retrieve the raster image and that is to slow for the application. I would like to know if someone knows why these method is so slow, if i cann make it faster or if someone knows a better and fast way to get a bufferedImage of one canvas 3d? public void postSwap() { GraphicsContext3D ctx = getGraphicsContext3D(); Rectangle rect = this.getBounds(); BufferedImage img = new BufferedImage (rect.width,rect.height, BufferedImage.TYPE_INT_RGB); ImageComponent2D comp = new ImageComponent2D(ImageComponent.FORMAT_RGB, img, true, false); Raster ras = new Raster(new Point3f(-1.0f,-1.0f,- 1.0f), Raster.RASTER_COLOR, 0, 0, rect.width, rect.height, comp, null); ctx.readRaster(ras); // Now strip out the image info BufferedImage output_img = ras.getImage().getImage(); SendImage(output_img); } --- Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - É grátis! http://antipopup.uol.com.br =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".