com.threerings.opengl.renderer.state
Class LightState

java.lang.Object
  extended by com.threerings.opengl.renderer.state.RenderState
      extended by com.threerings.opengl.renderer.state.LightState

public class LightState
extends RenderState

Contains the light state.


Field Summary
static LightState DISABLED
          A state that disables lighting (the default).
 
Fields inherited from class com.threerings.opengl.renderer.state.RenderState
ALPHA_STATE, ARRAY_STATE, COLOR_MASK_STATE, COLOR_STATE, CULL_STATE, DEPTH_STATE, FOG_STATE, LIGHT_STATE, LINE_STATE, MATERIAL_STATE, POINT_STATE, POLYGON_STATE, SHADER_STATE, STATE_COUNT, STENCIL_STATE, TEXTURE_STATE, TRANSFORM_STATE
 
Constructor Summary
LightState(Light[] lights, Color4f globalAmbient)
          Creates a new light state.
 
Method Summary
 void apply(Renderer renderer)
          Applies this state.
 Color4f getGlobalAmbient()
          Returns a reference to the global ambient intensity.
 Light[] getLights()
          Returns a reference to the array of lights.
 int getType()
          Returns the type of this state.
 void setGlobalAmbient(Color4f color)
          Sets the reference to the global ambient intensity.
 
Methods inherited from class com.threerings.opengl.renderer.state.RenderState
copy, createDefaultSet, createEmptySet, getDefaults, isDirty, setDirty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISABLED

public static final LightState DISABLED
A state that disables lighting (the default).

Constructor Detail

LightState

public LightState(Light[] lights,
                  Color4f globalAmbient)
Creates a new light state.

Method Detail

getLights

public Light[] getLights()
Returns a reference to the array of lights.


setGlobalAmbient

public void setGlobalAmbient(Color4f color)
Sets the reference to the global ambient intensity.


getGlobalAmbient

public Color4f getGlobalAmbient()
Returns a reference to the global ambient intensity.


getType

public int getType()
Description copied from class: RenderState
Returns the type of this state.

Specified by:
getType in class RenderState

apply

public void apply(Renderer renderer)
Description copied from class: RenderState
Applies this state.

Specified by:
apply in class RenderState


Copyright © 2011. All Rights Reserved.