Interface GlimpseCanvas

    • Method Detail

      • getGLProfile

        com.jogamp.opengl.GLProfile getGLProfile()
      • getGLDrawable

        com.jogamp.opengl.GLAutoDrawable getGLDrawable()
      • getGLContext

        com.jogamp.opengl.GLContext getGLContext()
      • paint

        void paint()
        Lays out any GlimpseLayout instances attached to the GlimpseCanvas and paints all GlimpsePainter instances attached to the GlimpseLayouts.
      • destroy

        void destroy()
        Destroys the native surface which this canvas draws to. Does not dispose of GL resources associated with GlimpsePainters and GlimpseLayouts attached to the GlimpseCanvas (as these may be attached to other GlimpseCanvases as well). Disposing of Glimpse resources can be done via #disposeAttached().
        See Also:
      • disposeAttached

        void disposeAttached()
        Disposes native resources of GlimpseLayouts and GlimpsePainters associated with the GlimpseCanvas.
        See Also:
      • dispose

        void dispose()
        A convenience method which is equivalent to: disposeAttached( ); destroy( );
      • disposePainter

        void disposePainter​(GlimpsePainter painter)

        Calls GlimpsePainter.dispose(GlimpseContext) the next time the GLContext associated with this GlimpseCanvas is active. Generally this call is equivalent to:

        this.getGLDrawable( ).invoke( false, new GLRunnable( ) {
      • isDestroyed

        boolean isDestroyed()
        whether or not #dispose() has been successfully called. Once true, this GlimpseCanvas is no longer valid for rendering.
      • addDisposeListener

        void addDisposeListener​(com.jogamp.opengl.GLRunnable runnable)
        Called when GLEventListener.dispose(GLAutoDrawable) event is fired by the GLAutoDrawable associated with the GlimpseCanvas. This can happen for reasons other than the window containing the GlimpseCanvas being closed (for example, moving the window between physical monitors or moving the container between docks in a docking framework). Thus, GlimpsePainters and GlimpseLayouts attached to this GlimpseCanvas should generally not be disposed when this callback occurs.
      • getSurfaceScale

        float[] getSurfaceScale()
        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.
        the scale factors as {scaleX, scaleY}
      • getDpi

        default int getDpi()
        Returns the ratio of pixels-per-inch for this canvas.