/** * Returns the <i>pixels per millimeter</i> value according to the <i>current</i> {@link MonitorMode mode}'s * {@link SurfaceSize#getResolution() surface resolution}. * <p> * To convert the result to <i>dpi</i>, i.e. dots-per-inch, multiply both components with <code>25.4f</code>. * </p> * @param ppmmStore float[2] storage for the ppmm result * @return the passed storage containing the ppmm for chaining */ public final float[] getPixelsPerMM(final float[] ppmmStore) { return getPixelsPerMM(getCurrentMode(), ppmmStore); }
@Override public final float[] getPixelsPerMM(final float[] ppmmStore) { getMainMonitor().getPixelsPerMM(ppmmStore); ppmmStore[0] *= (float)hasPixelScale[0] / (float)nativePixelScale[0]; ppmmStore[1] *= (float)hasPixelScale[1] / (float)nativePixelScale[1]; return ppmmStore; }
/** * Returns the <i>pixels per millimeter</i> value according to the <i>current</i> {@link MonitorMode mode}'s * {@link SurfaceSize#getResolution() surface resolution}. * <p> * To convert the result to <i>dpi</i>, i.e. dots-per-inch, multiply both components with <code>25.4f</code>. * </p> * @param ppmmStore float[2] storage for the ppmm result * @return the passed storage containing the ppmm for chaining */ public final float[] getPixelsPerMM(final float[] ppmmStore) { return getPixelsPerMM(getCurrentMode(), ppmmStore); }
@Override public final float[] getPixelsPerMM(final float[] ppmmStore) { getMainMonitor().getPixelsPerMM(ppmmStore); ppmmStore[0] *= hasPixelScale[0] / maxPixelScale[0]; ppmmStore[1] *= hasPixelScale[1] / maxPixelScale[1]; return ppmmStore; }
@Override public void init(final GLAutoDrawable drawable) { final MonitorDevice monitor = glWindow.getMainMonitor(); System.err.println("Main Monitor: "+monitor); final float[] pixelPerMM = monitor.getPixelsPerMM(new float[2]); System.err.println(" pixel/mm ["+pixelPerMM[0]+", "+pixelPerMM[1]+"]"); System.err.println(" pixel/in ["+pixelPerMM[0]*25.4f+", "+pixelPerMM[1]*25.4f+"]"); final GL gl = drawable.getGL(); System.err.println(JoglVersion.getGLInfo(gl, null)); System.err.println("Requested: "+drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities()); System.err.println("Chosen : "+drawable.getChosenGLCapabilities()); System.err.println("GL impl. class "+gl.getClass().getName()); if( gl.isGL4ES3() ) { final GL4ES3 _gl = gl.getGL4ES3(); System.err.println("GL4ES3 retrieved, impl. class "+_gl.getClass().getName()); } if( gl.isGL3() ) { final GL3 _gl = gl.getGL3(); System.err.println("GL3 retrieved, impl. class "+_gl.getClass().getName()); } if( gl.isGLES3() ) { final GLES3 _gl = gl.getGLES3(); System.err.println("GLES3 retrieved, impl. class "+_gl.getClass().getName()); } if( gl.isGLES2() ) { final GLES2 _gl = gl.getGLES2(); System.err.println("GLES2 retrieved, impl. class "+_gl.getClass().getName()); } }