com.jme.scene.state.lwjgl
Class LWJGLLightState

java.lang.Object
  extended by com.jme.scene.state.RenderState
      extended by com.jme.scene.state.LightState
          extended by com.jme.scene.state.lwjgl.LWJGLLightState
All Implemented Interfaces:
Savable

public class LWJGLLightState
extends LightState

LWJGLLightState subclasses the Light class using the LWJGL API to access OpenGL for light processing.

Version:
$Id: LWJGLLightState.java 4134 2009-03-19 21:04:38Z blaine.dev $
Author:
Mark Powell, Joshua Slack - reworked for StateRecords.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.scene.state.RenderState
RenderState.StateType
 
Field Summary
 
Fields inherited from class com.jme.scene.state.LightState
backLightMask, globalAmbient, lightMask, LIGHTS_ENABLED, localViewerOn, MASK_AMBIENT, MASK_DIFFUSE, MASK_GLOBALAMBIENT, MASK_SPECULAR, MAX_LIGHTS_ALLOWED, separateSpecularOn, twoSidedOn, zeroBuffer
 
Fields inherited from class com.jme.scene.state.RenderState
QUICK_COMPARE, RS_BLEND, RS_CLIP, RS_COLORMASK_STATE, RS_CULL, RS_FOG, RS_FRAGMENT_PROGRAM, RS_GLSL_SHADER_OBJECTS, RS_LIGHT, RS_MATERIAL, RS_MAX_STATE, RS_SHADE, RS_STENCIL, RS_TEXTURE, RS_VERTEX_PROGRAM, RS_WIREFRAME, RS_ZBUFFER
 
Constructor Summary
LWJGLLightState()
          Constructor instantiates a new LWJGLLightState.
 
Method Summary
 void apply()
          set iterates over the light queue and processes each individual light.
 StateRecord createStateRecord()
           
 RenderState extract(java.util.Stack<? extends RenderState> stack, Spatial spat)
          Extracts from the stack the correct renderstate that should apply to the given spatial.
 
Methods inherited from class com.jme.scene.state.LightState
attach, detach, detachAll, get, getClassTag, getGlobalAmbient, getLightList, getLightMask, getLocalViewer, getQuantity, getSeparateSpecular, getStateType, getTwoSidedLighting, getType, popLightMask, pushLightMask, read, setGlobalAmbient, setLightMask, setLocalViewer, setSeparateSpecular, setTwoSidedLighting, write
 
Methods inherited from class com.jme.scene.state.RenderState
isEnabled, needsRefresh, setEnabled, setNeedsRefresh, setQuickCompares
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LWJGLLightState

public LWJGLLightState()
Constructor instantiates a new LWJGLLightState.

Method Detail

apply

public void apply()
set iterates over the light queue and processes each individual light.

Specified by:
apply in class RenderState
See Also:
RenderState.apply()

createStateRecord

public StateRecord createStateRecord()
Specified by:
createStateRecord in class RenderState

extract

public RenderState extract(java.util.Stack<? extends RenderState> stack,
                           Spatial spat)
Description copied from class: RenderState
Extracts from the stack the correct renderstate that should apply to the given spatial. This is mainly used for RenderStates that can be cumulative such as TextureState or LightState. By default, the top of the static is returned. This function should not be called by users directly.

Overrides:
extract in class RenderState
Parameters:
stack - The stack to extract render states from.
spat - The spatial to apply the render states too.
Returns:
The render state to use.