Class GLCapabilities

    • Constructor Detail

      • GLCapabilities

        public GLCapabilities​(GLProfile glp)
                       throws GLException
        Creates a GLCapabilities object. All attributes are in a default state.
        Parameters:
        glp - GLProfile, or null for the default GLProfile
        Throws:
        GLException - if no profile is given and no default profile is available for the default device.
    • Method Detail

      • setGLProfile

        public void setGLProfile​(GLProfile profile)
        Sets the GL profile you desire
      • isPBuffer

        public final boolean isPBuffer()
        Description copied from interface: GLCapabilitiesImmutable
        Returns whether pbuffer offscreen mode is requested, available or chosen.

        Default is false.

        For chosen capabilities, only the selected offscreen surface is set to true.

        Specified by:
        isPBuffer in interface GLCapabilitiesImmutable
      • setPBuffer

        public void setPBuffer​(boolean enable)
        Requesting offscreen pbuffer mode.

        If enabled this method also invokes setOnscreen(false).

        Defaults to false.

        Requesting offscreen pbuffer mode disables the offscreen auto selection.

      • isFBO

        public final boolean isFBO()
        Description copied from interface: GLCapabilitiesImmutable
        Returns whether FBO offscreen mode is requested, available or chosen.

        Default is false.

        For chosen capabilities, only the selected offscreen surface is set to true.

        Specified by:
        isFBO in interface GLCapabilitiesImmutable
      • setFBO

        public void setFBO​(boolean enable)
        Requesting offscreen FBO mode.

        If enabled this method also invokes setOnscreen(false).

        Defaults to false.

        Requesting offscreen FBO mode disables the offscreen auto selection.

      • setDoubleBuffered

        public void setDoubleBuffered​(boolean enable)
        Enables or disables double buffering.
      • setStereo

        public void setStereo​(boolean enable)
        Enables or disables stereo viewing.
      • setHardwareAccelerated

        public void setHardwareAccelerated​(boolean enable)
        Enables or disables hardware acceleration.
      • setDepthBits

        public void setDepthBits​(int depthBits)
        Sets the number of bits requested for the depth buffer.
      • setStencilBits

        public void setStencilBits​(int stencilBits)
        Sets the number of bits requested for the stencil buffer.
      • getAccumRedBits

        public final int getAccumRedBits()
        Description copied from interface: GLCapabilitiesImmutable
        Returns the number of bits for the accumulation buffer's red component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
        Specified by:
        getAccumRedBits in interface GLCapabilitiesImmutable
      • setAccumRedBits

        public void setAccumRedBits​(int accumRedBits)
        Sets the number of bits requested for the accumulation buffer's red component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
      • getAccumGreenBits

        public final int getAccumGreenBits()
        Description copied from interface: GLCapabilitiesImmutable
        Returns the number of bits for the accumulation buffer's green component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
        Specified by:
        getAccumGreenBits in interface GLCapabilitiesImmutable
      • setAccumGreenBits

        public void setAccumGreenBits​(int accumGreenBits)
        Sets the number of bits requested for the accumulation buffer's green component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
      • getAccumBlueBits

        public final int getAccumBlueBits()
        Description copied from interface: GLCapabilitiesImmutable
        Returns the number of bits for the accumulation buffer's blue component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
        Specified by:
        getAccumBlueBits in interface GLCapabilitiesImmutable
      • setAccumBlueBits

        public void setAccumBlueBits​(int accumBlueBits)
        Sets the number of bits requested for the accumulation buffer's blue component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
      • getAccumAlphaBits

        public final int getAccumAlphaBits()
        Description copied from interface: GLCapabilitiesImmutable
        Returns the number of bits for the accumulation buffer's alpha component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
        Specified by:
        getAccumAlphaBits in interface GLCapabilitiesImmutable
      • setAccumAlphaBits

        public void setAccumAlphaBits​(int accumAlphaBits)
        Sets number of bits requested for accumulation buffer's alpha component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
      • setSampleBuffers

        public void setSampleBuffers​(boolean enable)
        Defaults to false.
        Indicates whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable.
        Mind that this requires the alpha component.
        If enabled this method also invokes setAlphaBits(1) if Capabilities.getAlphaBits() == 0.
      • getSampleBuffers

        public final boolean getSampleBuffers()
        Description copied from interface: GLCapabilitiesImmutable
        Returns whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable.

        Default is false.

        Specified by:
        getSampleBuffers in interface GLCapabilitiesImmutable
      • setNumSamples

        public void setNumSamples​(int numSamples)
        If sample buffers are enabled, indicates the number of buffers to be allocated. Defaults to 2.
        See Also:
        getNumSamples()
      • getNumSamples

        public final int getNumSamples()
        Description copied from interface: GLCapabilitiesImmutable
        Returns the number of sample buffers to be allocated if sample buffers are enabled, otherwise returns 0.

        Default is 0 due to disable sample buffers per default.

        Specified by:
        getNumSamples in interface GLCapabilitiesImmutable