com.jme3.renderer
Class RenderContext

java.lang.Object
  extended by com.jme3.renderer.RenderContext

public class RenderContext
extends java.lang.Object

Represents the current state of the graphics library. This class is used internally to reduce state changes. NOTE: This class is specific to OpenGL.


Field Summary
 boolean alphaTestEnabled
           
 ColorRGBA ambient
          Ambient color (GL1 only)
 IDList attribIndexList
          IDList for vertex attributes
 RenderState.StencilOperation backStencilDepthFailOperation
           
 RenderState.StencilOperation backStencilDepthPassOperation
           
 RenderState.TestFunction backStencilFunction
           
 RenderState.StencilOperation backStencilStencilFailOperation
           
 RenderState.BlendMode blendMode
           
 int boundArrayVBO
          Currently bound array vertex buffer.
 VertexBuffer[] boundAttribs
          Vertex attribs currently bound and enabled.
 int boundDrawBuf
          Currently bound draw buffer -2 = GL_NONE -1 = GL_BACK 0 = GL_COLOR_ATTACHMENT0 n = GL_COLOR_ATTACHMENTn where n is an integer greater than 1
 int boundElementArrayVBO
          Currently bound element array vertex buffer.
 int boundFBO
           
 int boundRB
          Currently bound Renderbuffer
 int boundReadBuf
          Currently bound read buffer
 int boundShaderProgram
           
 Image[] boundTextures
          Current bound texture IDs for each texture unit.
 int boundTextureUnit
          Currently bound texture unit
 int boundVertexArray
           
 boolean clipRectEnabled
           
 ColorRGBA color
          Material color (GL1 only)
 boolean colorWriteEnabled
           
 RenderState.FaceCullMode cullMode
           
 boolean depthTestEnabled
           
 boolean depthWriteEnabled
           
 ColorRGBA diffuse
          Diffuse color (GL1 only)
 RenderState.StencilOperation frontStencilDepthFailOperation
           
 RenderState.StencilOperation frontStencilDepthPassOperation
           
 RenderState.TestFunction frontStencilFunction
           
 RenderState.StencilOperation frontStencilStencilFailOperation
           
 float lineWidth
           
 int matrixMode
          For glMatrixMode.
 boolean normalizeEnabled
          For normals only.
 int numTexturesSet
           
 float pointSize
           
 boolean pointSprite
           
 boolean polyOffsetEnabled
           
 float polyOffsetFactor
           
 float polyOffsetUnits
           
 float shininess
          Shininess (GL1 only)
 ColorRGBA specular
          Specular color (GL1 only)
 boolean stencilTest
          Stencil Buffer state
 IDList textureIndexList
          IDList for texture units
 boolean useVertexColor
          Use vertex color (GL1 only)
 boolean wireframe
           
 
Constructor Summary
RenderContext()
           
 
Method Summary
 void reset()
          Reset the RenderContext to default GL state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cullMode

public RenderState.FaceCullMode cullMode
See Also:
RenderState.setFaceCullMode(com.jme3.material.RenderState.FaceCullMode)

depthTestEnabled

public boolean depthTestEnabled
See Also:
RenderState.setDepthTest(boolean)

alphaTestEnabled

public boolean alphaTestEnabled
See Also:
RenderState.setAlphaTest(boolean)

depthWriteEnabled

public boolean depthWriteEnabled
See Also:
RenderState.setDepthWrite(boolean)

colorWriteEnabled

public boolean colorWriteEnabled
See Also:
RenderState.setColorWrite(boolean)

clipRectEnabled

public boolean clipRectEnabled
See Also:
Renderer.setClipRect(int, int, int, int)

polyOffsetEnabled

public boolean polyOffsetEnabled
See Also:
RenderState.setPolyOffset(float, float)

polyOffsetFactor

public float polyOffsetFactor
See Also:
RenderState.setPolyOffset(float, float)

polyOffsetUnits

public float polyOffsetUnits
See Also:
RenderState.setPolyOffset(float, float)

normalizeEnabled

public boolean normalizeEnabled
For normals only. Uses GL_NORMALIZE.

See Also:
VertexBuffer.setNormalized(boolean)

matrixMode

public int matrixMode
For glMatrixMode.

See Also:
Renderer.setWorldMatrix(com.jme3.math.Matrix4f), Renderer.setViewProjectionMatrices(com.jme3.math.Matrix4f, com.jme3.math.Matrix4f)

pointSize

public float pointSize
See Also:
Mesh.setPointSize(float)

lineWidth

public float lineWidth
See Also:
Mesh.setLineWidth(float)

blendMode

public RenderState.BlendMode blendMode
See Also:
RenderState.setBlendMode(com.jme3.material.RenderState.BlendMode)

wireframe

public boolean wireframe
See Also:
RenderState.setWireframe(boolean)

pointSprite

public boolean pointSprite
See Also:
RenderState.setPointSprite(boolean)

boundShaderProgram

public int boundShaderProgram
See Also:
Renderer.setShader(com.jme3.shader.Shader)

boundFBO

public int boundFBO
See Also:
Renderer.setFrameBuffer(com.jme3.texture.FrameBuffer)

boundRB

public int boundRB
Currently bound Renderbuffer

See Also:
Renderer.setFrameBuffer(com.jme3.texture.FrameBuffer)

boundDrawBuf

public int boundDrawBuf
Currently bound draw buffer -2 = GL_NONE -1 = GL_BACK 0 = GL_COLOR_ATTACHMENT0 n = GL_COLOR_ATTACHMENTn where n is an integer greater than 1

See Also:
Renderer.setFrameBuffer(com.jme3.texture.FrameBuffer), FrameBuffer.setTargetIndex(int)

boundReadBuf

public int boundReadBuf
Currently bound read buffer

See Also:
boundDrawBuf, Renderer.setFrameBuffer(com.jme3.texture.FrameBuffer), FrameBuffer.setTargetIndex(int)

boundElementArrayVBO

public int boundElementArrayVBO
Currently bound element array vertex buffer.

See Also:
Renderer.renderMesh(com.jme3.scene.Mesh, int, int)

boundVertexArray

public int boundVertexArray
See Also:
Renderer.renderMesh(com.jme3.scene.Mesh, int, int)

boundArrayVBO

public int boundArrayVBO
Currently bound array vertex buffer.

See Also:
Renderer.renderMesh(com.jme3.scene.Mesh, int, int)

numTexturesSet

public int numTexturesSet

boundTextures

public Image[] boundTextures
Current bound texture IDs for each texture unit.

See Also:
Renderer.setTexture(int, com.jme3.texture.Texture)

textureIndexList

public IDList textureIndexList
IDList for texture units

See Also:
Renderer.setTexture(int, com.jme3.texture.Texture)

boundTextureUnit

public int boundTextureUnit
Currently bound texture unit

See Also:
Renderer.setTexture(int, com.jme3.texture.Texture)

stencilTest

public boolean stencilTest
Stencil Buffer state


frontStencilStencilFailOperation

public RenderState.StencilOperation frontStencilStencilFailOperation

frontStencilDepthFailOperation

public RenderState.StencilOperation frontStencilDepthFailOperation

frontStencilDepthPassOperation

public RenderState.StencilOperation frontStencilDepthPassOperation

backStencilStencilFailOperation

public RenderState.StencilOperation backStencilStencilFailOperation

backStencilDepthFailOperation

public RenderState.StencilOperation backStencilDepthFailOperation

backStencilDepthPassOperation

public RenderState.StencilOperation backStencilDepthPassOperation

frontStencilFunction

public RenderState.TestFunction frontStencilFunction

backStencilFunction

public RenderState.TestFunction backStencilFunction

boundAttribs

public VertexBuffer[] boundAttribs
Vertex attribs currently bound and enabled. If a slot is null, then it is disabled.


attribIndexList

public IDList attribIndexList
IDList for vertex attributes


ambient

public ColorRGBA ambient
Ambient color (GL1 only)


diffuse

public ColorRGBA diffuse
Diffuse color (GL1 only)


specular

public ColorRGBA specular
Specular color (GL1 only)


color

public ColorRGBA color
Material color (GL1 only)


shininess

public float shininess
Shininess (GL1 only)


useVertexColor

public boolean useVertexColor
Use vertex color (GL1 only)

Constructor Detail

RenderContext

public RenderContext()
Method Detail

reset

public void reset()
Reset the RenderContext to default GL state