public class RenderContext
extends java.lang.Object
TextureBinder
to
reduce texture binds as well. Call begin()
to setup the context, call end()
to undo all state changes. Use the setters to change state, use textureBinder
to bind textures.Modifier and Type | Field and Description |
---|---|
TextureBinder |
textureBinder
used to bind textures
|
Constructor and Description |
---|
RenderContext(TextureBinder textures) |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Sets up the render context, must be matched with a call to
end() . |
void |
end()
Resest all changed OpenGL states to their defaults.
|
void |
setBlending(boolean enabled,
int sFactor,
int dFactor) |
void |
setCullFace(int face) |
void |
setDepthMask(boolean depthMask) |
void |
setDepthTest(int depthFunction) |
void |
setDepthTest(int depthFunction,
float depthRangeNear,
float depthRangeFar) |
public final TextureBinder textureBinder
public RenderContext(TextureBinder textures)
public final void begin()
end()
. Assumes
that the OpenGL states are in their defaults.public final void end()
public final void setDepthMask(boolean depthMask)
public final void setDepthTest(int depthFunction)
public final void setDepthTest(int depthFunction, float depthRangeNear, float depthRangeFar)
public final void setBlending(boolean enabled, int sFactor, int dFactor)
public final void setCullFace(int face)