It's obvious that the flush() method of J3DGraphics2D is altering the current view transform, so it's best to be flushed last. As an alternative, you can use a raster object to make your 2d drawings on it.
You may post your observation as a bug, the fix should be easy (in opengl/jogl/gl4java/lwjgl I would use pushMatrix/popMatrix to encapsulate the flush() method). Cheers, Florin -----Original Message----- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] Behalf Of Rick Brownrigg Sent: Freitag, 19. März 2004 02:24 To: [EMAIL PROTECTED] Subject: [JAVA3D] more on mixed-mode rendering... FWIW, I can report more on some mixed-mode rendering weirdness.... As background, I have a derived Canvas3D that calls registered listeners during the "postRender()" phase. Some of the listeners simply draw 2D graphics using the J3DGraphics2D; others draw Shape3Ds on the fly using GraphicsContext3D. As it turns out, if *any* drawing is performed to a J3DGraphics2D, followed by a flush(), and subsequent drawing is performed via a GraphicsContext3D, the view transformation for the resultant 3D graphics is incorrect (and danged bizarre to boot). If I postpone the flush() on the J3DGraphics2D until all listeners have been called, everything appears to work out correctly (regardless of interspersed calls to the GraphicsContext3D's flush() method). Why? That I don't know -- its a rather strange interaction. Since these classes are part of the core and not source-distributed, I can't begin to explain. On the bright side, given Doug W's message of other day, I/we will soon be able to find out -- and correct it! Rick Brownrigg =========================================================================== 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".