Hello, I am using J3DGraphics2D to draw over my canvas. It is implemented such that I draw into a buffered image, then draw this buffered image on the canvas using J3DGraphics2D.drawAndFlushImage(...).
I found that if I draw directly using the graphics from Canvas3D.getGraphics2D(), the 2D drawing looks correct and scales appropriately as the canvas resizes. However, if I draw into an image, then draw that image onto the canvas, it appears to be stretched by about 1.5 as the width of the canvas grows or shrinks. I have attached a slightly modified version of a J3DGraphics2D sample application that was posted to this list a while back. In the postRender section there are two commented sections: the one that works and the one with the scale problem. Uncomment one of them and compare the problem. I might also add that the scale problem only occurs when Java3D is trying to share the buffer (the image is type 4BYTE_ABGR). Using TYPE_INT_ABGR scales correctly, but that is most likely because Java3D is copying the image. This is on Win2K, OpenGL, NVidia. I can get exact driver information if required. There was a previous mention of this problem by another developer, but no confirmations: http://archives.java.sun.com/cgi-bin/wa?A2=ind0202&L=java3d-interest&P=R6441 4&I=-3&X=5A1EBB1D99C73E85F9&[EMAIL PROTECTED] That developer was using ATI and saw the problem. Thanks, -mike =========================================================================== 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".
HelloUniverse.java
Description: Binary data