Class RenderContext
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.utils.RenderContext
-
public class RenderContext extends java.lang.ObjectManages OpenGL state and tries to reduce state changes. Uses aTextureBinderto reduce texture binds as well. Callbegin()to setup the context, callend()to undo all state changes. Use the setters to change state, usetextureBinderto bind textures.
-
-
Field Summary
Fields Modifier and Type Field Description TextureBindertextureBinderused to bind textures
-
Constructor Summary
Constructors Constructor Description RenderContext(TextureBinder textures)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()Sets up the render context, must be matched with a call toend().voidend()Resets all changed OpenGL states to their defaults.voidsetBlending(boolean enabled, int sFactor, int dFactor)voidsetCullFace(int face)voidsetDepthMask(boolean depthMask)voidsetDepthTest(int depthFunction)voidsetDepthTest(int depthFunction, float depthRangeNear, float depthRangeFar)
-
-
-
Field Detail
-
textureBinder
public final TextureBinder textureBinder
used to bind textures
-
-
Constructor Detail
-
RenderContext
public RenderContext(TextureBinder textures)
-
-
Method Detail
-
begin
public void begin()
Sets up the render context, must be matched with a call toend().
-
end
public void end()
Resets all changed OpenGL states to their defaults.
-
setDepthMask
public void setDepthMask(boolean depthMask)
-
setDepthTest
public void setDepthTest(int depthFunction)
-
setDepthTest
public void setDepthTest(int depthFunction, float depthRangeNear, float depthRangeFar)
-
setBlending
public void setBlending(boolean enabled, int sFactor, int dFactor)
-
setCullFace
public void setCullFace(int face)
-
-