I have used offscreen rendering for printing of canvas3d. The reason
why I used it is that by printing I must get the current rendering
results of canvas3d. But the canvas3d is updated automatically and
I have get wrong rendering results for another delayed time. The canvas3d
can be overlapped by another frames which in the delayed time occured.
So that I have used offscreen rendering to get the correct image of
canvas3d. But it is very very slow.
I don't know if I have done it in a wrong way. The code I have used
is followed. I want to know also how the performance of offscreen rendering
should be actually or what I have done incorrectly.
class OffScreenCanvas3D extends Canvas3D {
OffScreenCanvas3D(GraphicsConfiguration graphicsConfiguration,
boolean offScreen) {
super(graphicsConfiguration, offScreen);
}
BufferedImage doRender(int width, int height) {
BufferedImage bImage =
new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
ImageComponent2D buffer =
new ImageComponent2D(ImageComponent.FORMAT_RGBA, bImage);
setOffScreenBuffer(buffer);
renderOffScreenBuffer();
waitForOffScreenRendering();
bImage = getOffScreenBuffer().getImage();
return bImage;
}
public void postSwap() {
// No-op since we always wait for off-screen rendering to complete
}
}
Bo
-----Urspr�ngliche Nachricht-----
Von: Jeffery, Myles [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 22. Dezember 2000 12:23
An: [EMAIL PROTECTED]
Betreff: [JAVA3D] Performance of rendering offscreen
Hi,
Has anyone used offscreen rendering? If so, what is the performance like
compared to onscreen rendering? The reason I ask is that I am concerned at
the limitations of Java3D onscreen rendering regarding problems with
combining lightweight and heavyweight components.
I am willing to sacrifice some speed in return for more control, but I don't
want to end up with an application that runs like a snail.
Any advice?
Thanks,
Myles
===========================================================================
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".
===========================================================================
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".