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 |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private SimpleOrthoGroupStrategy. | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterGroup(int group)
Implements com. Invoked directly after rendering of a group has completed |
| public void | afterGroups()
Implements com. Invoked after having rendered all groups |
| public void | beforeGroup(int group, Array<Decal> contents)
Implements com. Invoked directly before rendering the contents of a group |
| public void | beforeGroups()
Implements com. Invoked before rendering any group |
| public int | decideGroup(Decal decal)
Implements com. Assigns a group to a decal |
| public ShaderProgram | getGroupShader(int group)
Implements com. Returns the shader to be used for the group. |
| comparator | back to summary |
|---|---|
| private SimpleOrthoGroupStrategy. | |
| GROUP_BLEND | back to summary |
|---|---|
| private static final int GROUP_BLEND | |
| GROUP_OPAQUE | back to summary |
|---|---|
| private static final int GROUP_OPAQUE | |
| SimpleOrthoGroupStrategy | back to summary |
|---|---|
| public SimpleOrthoGroupStrategy() | |
| afterGroup | back to summary |
|---|---|
| public void afterGroup(int group) Implements com. Doc from com. Invoked directly after rendering of a group has completed
| |
| afterGroups | back to summary |
|---|---|
| public void afterGroups() Implements com. Doc from com. Invoked after having rendered all groups
| |
| beforeGroup | back to summary |
|---|---|
| public void beforeGroup(int group, Array<Decal> contents) Implements com. Doc from com. Invoked directly before rendering the contents of a group
| |
| beforeGroups | back to summary |
|---|---|
| public void beforeGroups() Implements com. Doc from com. Invoked before rendering any group
| |
| decideGroup | back to summary |
|---|---|
| public int decideGroup(Decal decal) Implements com. Doc from com. Assigns a group to a decal
| |
| getGroupShader | back to summary |
|---|---|
| public ShaderProgram getGroupShader(int group) Implements com. Doc from com. Returns the shader to be used for the group. Can be null in which case the GroupStrategy doesn't support GLES 2.0
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(Decal a, Decal b)
Implements java. Compares its two arguments for order. |
| Comparator | back to summary |
|---|---|
| pack-priv Comparator() | |
| compare | back to summary |
|---|---|
| public int compare(Decal a, Decal b) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |