@Override public void init(GLAutoDrawable drawable) { super.init(drawable); drawable.getGL().setSwapInterval(SwapInterval); t0 = Platform.currentTimeMillis(); final Window win = (Window) drawable.getUpstreamWidget(); final MonitorDevice monitor = win.getMainMonitor(); final float[] pixelsPerMM = new float[2]; monitor.getPixelsPerMM(pixelsPerMM); final float[] dotsPerInch = new float[] {pixelsPerMM[0] * 25.4f, pixelsPerMM[1] * 25.4f}; dpiH = dotsPerInch[1]; System.err.println(getFontInfo()); System.err.println( "fontSize " + fontSizeFixed + ", dotsPerMM " + pixelsPerMM[0] + "x" + pixelsPerMM[1] + ", dpi " + dotsPerInch[0] + "x" + dotsPerInch[1] + ", pixelSize " + font.getPixelSize(fontSizeFixed, dotsPerInch[1] /* dpi display */)); }
@Override public void dispose(GLAutoDrawable drawable) { final GL2ES2 gl = drawable.getGL().getGL2ES2(); screenshot.dispose(gl); regionFPS.destroy(gl); regionFPSAnim.destroy(gl); super.dispose(drawable); }