Class AbstractStyle

java.lang.Object
zombie.core.Styles.AbstractStyle
All Implemented Interfaces:
Style
Direct Known Subclasses:
AdditiveStyle, LightingStyle, TransparentStyle, UIFBOStyle

public abstract class AbstractStyle extends Object implements Style
Convenient base class implementation of Style
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    If not rendering a sprite, then we perform a build() to create GeometryData Later, render() is called, with a vertex offset position and index offset position.
     
    boolean
    Whether to actually render a sprite when using this Style.
    int
     
    void
    render(int vertexOffset, int indexOffset)
    If not rendering a sprite, then render stuff.
    void
    Called to reset GL rendering state after actual drawing is done.
    void
    Called to set up GL rendering state before actual drawing is done.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractStyle

      public AbstractStyle()
  • Method Details

    • getRenderSprite

      public boolean getRenderSprite()
      Description copied from interface: Style
      Whether to actually render a sprite when using this Style.
      Specified by:
      getRenderSprite in interface Style
      Returns:
      boolean
    • getAlphaOp

      public AlphaOp getAlphaOp()
      Specified by:
      getAlphaOp in interface Style
      Returns:
      the style's alpha operation
    • getStyleID

      public int getStyleID()
      Specified by:
      getStyleID in interface Style
      Returns:
      the style's ID, which affects its rendering order
    • resetState

      public void resetState()
      Description copied from interface: Style
      Called to reset GL rendering state after actual drawing is done.
      Specified by:
      resetState in interface Style
    • setupState

      public void setupState()
      Description copied from interface: Style
      Called to set up GL rendering state before actual drawing is done.
      Specified by:
      setupState in interface Style
    • build

      public GeometryData build()
      Description copied from interface: Style
      If not rendering a sprite, then we perform a build() to create GeometryData Later, render() is called, with a vertex offset position and index offset position. Return null if you are going to handle your own VBOs in Style.setupState().
      Specified by:
      build in interface Style
      Returns:
      the vertex data, or null
    • render

      public void render(int vertexOffset, int indexOffset)
      Description copied from interface: Style
      If not rendering a sprite, then render stuff. Our geometry was written to a pre-prepared buffer which is pointed to already.
      Specified by:
      render in interface Style