Don't use Behavior callback, try running on user thread. A simple test case would be [EMAIL PROTECTED] for us to see what's wrong.
I am in the user thread. It's a callback from a menu selection. However my app is fairly large, so I extracted out the necessary into two files attached.
If you get a picture, then it might be a platform specific issue. On my system it comes up as the background color. I basically combined TestOrbit with PrintFromButton.
But I also might be missing something.
Thanks for taking the time to look. -DaveS
Java3D generate image correctly if you output the pixels of image:
BufferedImage bImageRet = offscreencanvas. getOffScreenBuffer(). getImage();
System.out.println("width " + bImageRet.getWidth() + " height " +
bImageRet.getHeight());
int a, r, g, b, rgb;
for (int i=0; i < bImageRet.getHeight(); i++) {
for (int j=0; j < bImageRet.getWidth(); j++) {
rgb = bImageRet.getRGB(j, i);
a = (rgb >> 24) & 0xff;
r = (rgb >> 16) & 0xff;
g = (rgb >> 8) & 0xff;
b = rgb & 0xff;
System.out.print("(" + r + " " + g + " " + b + " " + a + " " +
")");
}
System.out.println("");
}It is the ImageIO that have problem to save it. (besides a missing file close to flush output) Please check with ImageIO API.
- Kelvin ------------ Java 3D Team Sun Microsystems Inc.
=========================================================================== 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".
