Class GlimpseContextImpl

    • Constructor Detail

      • GlimpseContextImpl

        public GlimpseContextImpl​(com.jogamp.opengl.GLContext context,
                                  float[] scale,
                                  int dpi)
      • GlimpseContextImpl

        public GlimpseContextImpl​(GlimpseCanvas canvas)
    • Method Detail

      • getGLContext

        public com.jogamp.opengl.GLContext getGLContext()
        Specified by:
        getGLContext in interface GlimpseContext
        Returns:
        a reference to the OpenGL rendering context wrapped by this GlimpseContext
      • getGL

        public com.jogamp.opengl.GL getGL()
        Specified by:
        getGL in interface GlimpseContext
        Returns:
        a convenience method shorthand for the common: getGLContext( ).getGL( )
      • getDPI

        public int getDPI()
        Specified by:
        getDPI in interface GlimpseContext
        Returns:
        the ratio of pixels per inch for the current context
      • getSurfaceScale

        public float[] getSurfaceScale()
        Description copied from interface: GlimpseContext
        Returns the scale factors needed to convert the _native_ pixel coordinates to the _window_ pixel coordinates. This only really matters on displays like like Macbook Retina.
        Specified by:
        getSurfaceScale in interface GlimpseContext
        Returns:
        the scale factors as {scaleX, scaleY}