public class LWJGLRenderEngineState extends Object implements RenderEngineState
RenderEngineState| Modifier and Type | Field and Description |
|---|---|
protected BlendFunction[] |
blendFunction
Stores the 2-component blend function which is currently active.
|
protected FrameBuffer |
boundFbo
Stores the bound framebuffer object.
|
protected Mesh |
boundMesh
Stores the bound
Mesh |
protected Shader |
boundShader
Stores the bound
Shader |
protected Texture |
boundTexture
Stores the bound
Texture |
protected Color |
clearColor
Stores the color to clear the screen.
|
protected boolean[] |
colorMask
Stores the active color mask (RGBA)
|
protected Face |
cullFace
Stores which face is getting culled.
|
protected DepthFunction |
depthFunction
Stores which
DepthFunction
is currently active. |
protected boolean |
depthWrite
Stores whether or not the engine writes into the depth buffer.
|
protected Map<Feature,Boolean> |
enabled
Stores which features are enabled or disabled.
|
protected FrontFaceMethod |
frontFace
Stores how faces are drawn.
|
protected FillMode |
polygonMode
Store how polygons are getting filled.
|
protected boolean |
throwUnchanged
Indicates whether or not to throw exceptions,
when a state changed is invoked, but the state is
already set on the graphics card program.
|
protected String |
version
Stores the version string of the OpenGL Version on the system.
|
| Constructor and Description |
|---|
LWJGLRenderEngineState()
Constructs a new LWJGLRenderEngine state.
|
LWJGLRenderEngineState(boolean throwUnchanged) |
protected String version
protected final boolean throwUnchanged
protected Map<Feature,Boolean> enabled
Featureprotected DepthFunction depthFunction
DepthFunction
is currently active.protected Face cullFace
protected Color clearColor
protected FrontFaceMethod frontFace
protected boolean depthWrite
protected BlendFunction[] blendFunction
protected FillMode polygonMode
protected boolean[] colorMask
protected FrameBuffer boundFbo
public LWJGLRenderEngineState()
throwUnchangedpublic LWJGLRenderEngineState(boolean throwUnchanged)
public String getVersion()
GL11.glGetString(int).
(Caches the value after on first call!)getVersion in interface RenderEngineStatepublic void clear(boolean color,
boolean depth,
boolean stencil)
clear in interface RenderEngineStatepublic void enable(Feature feature)
enable in interface RenderEngineStatepublic void disable(Feature feature)
disable in interface RenderEngineStatepublic boolean isEnabled(Feature feature)
isEnabled in interface RenderEngineStatepublic void cullFace(Face face)
cullFace in interface RenderEngineStatepublic Face getCullFace()
getCullFace in interface RenderEngineStatepublic void setFrontFace(FrontFaceMethod face)
setFrontFace in interface RenderEngineStatepublic FrontFaceMethod getFrontFace()
getFrontFace in interface RenderEngineStatepublic void setClearColor(Color color)
setClearColor in interface RenderEngineStatepublic Color getClearColor()
getClearColor in interface RenderEngineStatepublic void setDepthFunction(DepthFunction function)
setDepthFunction in interface RenderEngineStatepublic DepthFunction getDepthFunction()
getDepthFunction in interface RenderEngineStatepublic void setBlendFunction(BlendFunction sfactor, BlendFunction dfactor)
setBlendFunction in interface RenderEngineStatepublic BlendFunction[] getBlendFunction()
getBlendFunction in interface RenderEngineStatepublic void enableDepthWrite(boolean enable)
enableDepthWrite in interface RenderEngineStatepublic boolean isDepthWrite()
isDepthWrite in interface RenderEngineStatepublic void setPolygonMode(FillMode mode)
setPolygonMode in interface RenderEngineStatepublic FillMode getPolygonMode()
getPolygonMode in interface RenderEngineStatepublic void setColorWrite(boolean r,
boolean g,
boolean b,
boolean a)
setColorWrite in interface RenderEngineStatepublic boolean[] isColorWrite()
isColorWrite in interface RenderEngineStatepublic void setBound(FrameBuffer fbo)
setBound in interface RenderEngineStatepublic FrameBuffer getBoundFbo()
getBoundFbo in interface RenderEngineStatepublic void setBound(Texture texture)
setBound in interface RenderEngineStatepublic Texture getBoundTexture()
getBoundTexture in interface RenderEngineStatepublic void setBound(Mesh mesh)
setBound in interface RenderEngineStatepublic Mesh getBoundMesh()
getBoundMesh in interface RenderEngineStatepublic void setBound(Shader shader)
setBound in interface RenderEngineStatepublic Shader getBoundShader()
getBoundShader in interface RenderEngineStateCopyright © 2014. All rights reserved.