Class GLAutoDrawableDelegate

    • Constructor Detail

      • GLAutoDrawableDelegate

        public GLAutoDrawableDelegate​(GLDrawable drawable,
                                      GLContext context,
                                      Object upstreamWidget,
                                      boolean ownDevice,
                                      RecursiveLock lock)

        The GLContext can be assigned later manually via setContext(ctx) or it will be created lazily at the 1st display() method call.
        Lazy GLContext creation will take a shared GLContext into account which has been set directly or via another GLAutoDrawable.

        Parameters:
        drawable - a valid GLDrawable, may not be realized yet.
        context - a valid GLContext, may not have been made current (created) yet, may not be associated w/ drawable yet, may be null for lazy initialization at 1st display().
        upstreamWidget - optional UI element holding this instance, see getUpstreamWidget().
        ownDevice - pass true if AbstractGraphicsDevice.close() shall be issued, otherwise pass false. Closing the device is required in case the drawable is created w/ it's own new instance, e.g. offscreen drawables, and no further lifecycle handling is applied.
        lock - optional custom RecursiveLock.