Class SimpleOrthoGroupStrategy
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.decals.SimpleOrthoGroupStrategy
-
- All Implemented Interfaces:
GroupStrategy
public class SimpleOrthoGroupStrategy extends java.lang.Object implements GroupStrategy
Minimalistic grouping strategy useful for orthogonal scenes where the camera faces the negative z axis. Handles enabling and disabling of blending and uses world-z only front to back sorting for transparent decals.
States (* = any, EV = entry value - same as value before flush):
expects exits on glDepthMask true EV | true GL_DEPTH_TEST enabled EV glDepthFunc GL_LESS | GL_LEQUAL EV GL_BLEND disabled EV | disabled glBlendFunc * * GL_TEXTURE_2D * disabled
-
-
Constructor Summary
Constructors Constructor Description SimpleOrthoGroupStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterGroup(int group)
Invoked directly after rendering of a group has completedvoid
afterGroups()
Invoked after having rendered all groupsvoid
beforeGroup(int group, Array<Decal> contents)
Invoked directly before rendering the contents of a groupvoid
beforeGroups()
Invoked before rendering any groupint
decideGroup(Decal decal)
Assigns a group to a decalShaderProgram
getGroupShader(int group)
Returns the shader to be used for the group.
-
-
-
Method Detail
-
decideGroup
public int decideGroup(Decal decal)
Description copied from interface:GroupStrategy
Assigns a group to a decal- Specified by:
decideGroup
in interfaceGroupStrategy
- Parameters:
decal
- Decal to assign group to- Returns:
- group assigned
-
beforeGroup
public void beforeGroup(int group, Array<Decal> contents)
Description copied from interface:GroupStrategy
Invoked directly before rendering the contents of a group- Specified by:
beforeGroup
in interfaceGroupStrategy
- Parameters:
group
- Group that will be renderedcontents
- Array of entries of arrays containing all the decals in the group
-
afterGroup
public void afterGroup(int group)
Description copied from interface:GroupStrategy
Invoked directly after rendering of a group has completed- Specified by:
afterGroup
in interfaceGroupStrategy
- Parameters:
group
- Group which completed rendering
-
beforeGroups
public void beforeGroups()
Description copied from interface:GroupStrategy
Invoked before rendering any group- Specified by:
beforeGroups
in interfaceGroupStrategy
-
afterGroups
public void afterGroups()
Description copied from interface:GroupStrategy
Invoked after having rendered all groups- Specified by:
afterGroups
in interfaceGroupStrategy
-
getGroupShader
public ShaderProgram getGroupShader(int group)
Description copied from interface:GroupStrategy
Returns the shader to be used for the group. Can be null in which case the GroupStrategy doesn't support GLES 2.0- Specified by:
getGroupShader
in interfaceGroupStrategy
- Parameters:
group
- the group- Returns:
- the
ShaderProgram
-
-