Class OGLInitNode

All Implemented Interfaces:
OGLNode<OGL11Graphics>

public class OGLInitNode extends OGLTriggeredNode<OGL11Graphics>
A one-time triggered node that performs usually one-time OpenGL setup commands, like clear color, VSYNC, hints, or whatever.

If you change anything on this node before it is triggered, you will have to set it to be triggered again in order to take effect.

Author:
Matthew Tropiano
  • Constructor Details

    • OGLInitNode

      public OGLInitNode()
      Creates a new init node.
      By default:

      VSYNC is disabled.
      All hints are set to HintValue.DONT_CARE;
      The clear color is (0,0,0,0), RGBA.
      The fill mode is FILLED.

  • Method Details

    • doTriggeredDisplay

      public void doTriggeredDisplay(OGL11Graphics gl)
      Description copied from class: OGLTriggeredNode
      This is the method called by OGLTriggeredNode.onDisplay(OGLGraphics) for when the triggered method needs to run.
      Specified by:
      doTriggeredDisplay in class OGLTriggeredNode<OGL11Graphics>
      Parameters:
      gl - the OGLGraphics context.
    • getPointSmoothHint

      public HintValue getPointSmoothHint()
      Returns:
      the current point smooth hint value.
    • getLineSmoothHint

      public HintValue getLineSmoothHint()
      Returns:
      the current line smooth hint value.
    • getPolygonSmoothHint

      public HintValue getPolygonSmoothHint()
      Returns:
      the current polygon smooth hint value.
    • getFogCalculationHint

      public HintValue getFogCalculationHint()
      Returns:
      the current fog color calculation hint.
    • getGenerateMipmapHint

      public HintValue getGenerateMipmapHint()
      Returns:
      the current mipmap generation hint.
    • getPerspectiveCorrectionHint

      public HintValue getPerspectiveCorrectionHint()
      Returns:
      the current perspective correction hint.
    • getTextureCompressionHint

      public HintValue getTextureCompressionHint()
      Returns:
      the current texture compression hint.
    • setPointSmoothHint

      public void setPointSmoothHint(HintValue value)
      Set point smooth hint value.
      Parameters:
      value - the hint value.
    • setLineSmoothHint

      public void setLineSmoothHint(HintValue value)
      Set line smooth hint value.
      Parameters:
      value - the hint value.
    • setPolygonSmoothHint

      public void setPolygonSmoothHint(HintValue value)
      Set polygon smooth hint value.
      Parameters:
      value - the hint value.
    • setFogCalculationHint

      public void setFogCalculationHint(HintValue value)
      Set fog calculation hint.
      Parameters:
      value - the hint value.
    • setGenerateMipmapHint

      public void setGenerateMipmapHint(HintValue value)
      Set mipmap generation hint.
      Parameters:
      value - the hint value.
    • setPerspectiveCorrectionHint

      public void setPerspectiveCorrectionHint(HintValue value)
      Set prespective correction hint.
      Parameters:
      value - the hint value.
    • setTextureCompressionHint

      public void setTextureCompressionHint(HintValue value)
      Set texture compression hint.
      Parameters:
      value - the hint value.
    • setAllHintsTo

      public void setAllHintsTo(HintValue hint)
      Sets all hint options to a single value.
      Parameters:
      hint - the value to set to.
    • setFillMode

      public void setFillMode(FillMode fillMode)
      Sets the global filling mode.
      Parameters:
      fillMode - the fill mode to use.
    • getFillMode

      public FillMode getFillMode()
      Returns:
      the current the global filling mode.