|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy
public class CameraGroupStrategy
Minimalistic grouping strategy that splits decals into opaque and transparent ones enabling and disabling blending as needed.
Opaque decals are rendered first (decal color is ignored in opacity check).
Use this strategy only if the vast majority of your decals are opaque and the few transparent ones are unlikely to overlap.
Can produce invisible artifacts when transparent decals overlap each other.
States (* = any, EV = entry value - same as value before flush):
expects | exits on | |
glDepthMask | true | EV |
GL_DEPTH_TEST | enabled | EV |
glDepthFunc | GL_LESS | GL_LEQUAL | EV |
GL_BLEND | disabled | EV | disabled |
glBlendFunc | * | * |
GL_TEXTURE_2D | * | disabled |
Constructor Summary | |
---|---|
CameraGroupStrategy(Camera camera)
|
Method Summary | |
---|---|
void |
afterGroup(int group)
Invoked directly after rendering of a group has completed |
void |
afterGroups()
Invoked after having rendered all groups |
void |
beforeGroup(int group,
Array<Decal> contents)
Invoked directly before rendering the contents of a group |
void |
beforeGroups()
Invoked before rendering any group |
int |
decideGroup(Decal decal)
Assigns a group to a decal |
Camera |
getCamera()
|
ShaderProgram |
getGroupShader(int group)
Returns the shader to be used for the group. |
void |
setCamera(Camera camera)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CameraGroupStrategy(Camera camera)
Method Detail |
---|
public void setCamera(Camera camera)
public Camera getCamera()
public int decideGroup(Decal decal)
GroupStrategy
decideGroup
in interface GroupStrategy
decal
- Decal to assign group to
public void beforeGroup(int group, Array<Decal> contents)
GroupStrategy
beforeGroup
in interface GroupStrategy
group
- Group that will be renderedcontents
- List of entries of arrays containing all the decals in the grouppublic void afterGroup(int group)
GroupStrategy
afterGroup
in interface GroupStrategy
group
- Group which completed renderingpublic void beforeGroups()
GroupStrategy
beforeGroups
in interface GroupStrategy
public void afterGroups()
GroupStrategy
afterGroups
in interface GroupStrategy
public ShaderProgram getGroupShader(int group)
GroupStrategy
getGroupShader
in interface GroupStrategy
group
- the group
ShaderProgram
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |