From: <NM...@th...> - 2001-12-10 20:31:17
|
Hi, Regarding your first issue... Try calling " gl.glTranslatef(0.0f,-1.0f,0.0f) " . For some reason the GLCanvas uses the left hand rule and the GLJPanel is using the right hand rule. So when drawing scenes get kind of turned around. I don't know whether this is documented anywhere, but I think it should be added if it isn't. Or the "quirk" should maybe be looked at being corrected so the two components are consistent. As for your second issue, sorry, I am unable to help you out. Hope that helps, Noah Toshiyuki Ishimura / 石村 俊幸 <is...@mi...> To: <gl4...@li...> Sent by: cc: gl4...@li...urc Subject: [gl4java-usergroup] GLJPanel bug? eforge.net 12/10/2001 01:25 PM I have a question and a wish. I'm making a trial the GLJPanel. I declared a Panel class extended from the GLJPanel and transplanted from a GLCanvas working correctly to the Panel. However, the Panel shows the reverse view every time. I try to modify the GLJPanel class as follows: --- original code --- if(!customOffScrnSize) gr.drawImage(offImage, 0, 0, this); else { size=super.getSize(); gr.drawImage(offImage, 0, 0, size.width, size.height, this); } --- original code --- --- modified code --- Graphics2D gr2d = (Graphics2D) gr; if(!customOffScrnSize) { gr2d.drawImage(offImage, new AffineTransform(1, 0, 0, -1, 0, offImage.getHeight()), this); } else { size=super.getSize(); gr2d.drawImage(offImage, new AffineTransform(1, 0, 0, -1, 0, offImage.getHeight()), this); } --- modified code --- After this modification, I get the same result between the GLCanvas and the GLJPanel. Does this GLJPanel behavior keep GL4Java's specification? Also, I wish to speed up the GLJPanel with new API in JDK1.4 (e.g. the VolatileImage class and the java.nio package). GL4Java developers have any plan at this point? I'm sorry about my strange english. Regards, -- Toshiyuki Ishimura is...@mi... _______________________________________________ gl4java-usergroup mailing list gl4...@li... https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup |