Package zombie.core.Styles
Class AbstractStyle
java.lang.Object
zombie.core.Styles.AbstractStyle
- All Implemented Interfaces:
Style
- Direct Known Subclasses:
AdditiveStyle
,LightingStyle
,TransparentStyle
,UIFBOStyle
Convenient base class implementation of
Style
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
If not rendering a sprite, then we perform a build() to createGeometryData
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.
-
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 interfaceStyle
- Returns:
- boolean
-
getAlphaOp
- Specified by:
getAlphaOp
in interfaceStyle
- Returns:
- the style's alpha operation
-
getStyleID
public int getStyleID()- Specified by:
getStyleID
in interfaceStyle
- 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 interfaceStyle
-
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 interfaceStyle
-
build
Description copied from interface:Style
If not rendering a sprite, then we perform a build() to createGeometryData
Later, render() is called, with a vertex offset position and index offset position. Return null if you are going to handle your own VBOs inStyle.setupState()
. -
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.
-