also note bug 4504138 "stereo wrong transformation in immediate for rendering in left eye image buffer"
Guang Bin Liu schrieb: > Hi Friends: > > In the following code, I render the left/right eye images separately, using > two render methods (Because I need to control the rotation of the two image > separately). Possibly due to the repeated call to canvas.swap(), the image > allocated to each eye is changing: some times each image is seen by the > other eye. This problem can be solved if I render two images with same > GraphicsContext3D method. However, I will not be able to control seperate > rotations. Could any one give me a suggestion whether I can keep each eye > viewing the allocated image in the following methods? > > Thank you a lot! > > public void renderLeft() > { > if (gcLeft == null) > { > gcLeft = canvas.getGraphicsContext3D(); > grt1=grat1.getRotate(); > } > cmtleft.rotZ(Math.PI/2); > gcLeft.clear(); > gcLeft.setModelTransform(cmtleft); > gcLeft.setStereoMode(GraphicsContext3D.STEREO_LEFT); > gcLeft.draw(grt1); > canvas.swap(); > } > > public void renderRight() > { > if (gcRight == null) > { > gcRight = canvas.getGraphicsContext3D(); > grt2=grat2.getRotate(); > } > cmt.rotY(-angle); > gcRight.clear(); > gcRight.setModelTransform(cmt); > gcRight.setStereoMode(GraphicsContext3D.STEREO_RIGHT); > gcRight.draw(grt2); > canvas.swap(); > } > > public void run() > { > while (true) > { > renderLeft(); > renderRight(); > } > } > > G.B. Liu > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > =========================================================================== > 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".