From: <is...@mi...> - 2001-12-10 19:25:41
|
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... |