Interface GLFBODrawable

  • All Superinterfaces:
    GLDrawable, NativeSurfaceHolder
    All Known Subinterfaces:
    GLFBODrawable.Resizeable, GLOffscreenAutoDrawable.FBO

    public interface GLFBODrawable
    extends GLDrawable
    Platform-independent GLDrawable specialization, exposing FBObject functionality.

    A GLFBODrawable is uninitialized until a GLContext is bound and made current the first time, hence only then it's capabilities fully reflect expectations, i.e. color, depth, stencil and MSAA bits will be valid only after the first makeCurrent() call. On-/offscreen bits are valid after setRealized(true).

    MSAA is used if requested.

    Double buffering is used if requested.

    In MSAA mode, it always uses the implicit 2nd framebuffer sink. Hence double buffering is always the case w/ MSAA.

    In non MSAA a second explicit framebuffer is being used. This method allows compliance w/ the spec, i.e. read and draw framebuffer selection and double buffer usage for e.g. glReadPixels(..). This method also allows usage of both textures seperately.

    It would be possible to implement double buffering simply using FBObject.Colorbuffers with one framebuffer. This would require mode selection and hence complicate the API. Besides, it would not support differentiation of read and write framebuffer and hence not be spec compliant.

    Actual swapping of the FBObject.Colorbuffers and/or framebuffer is performed either in the context current hook or when swapping buffers, whatever comes first.