libgdx API

com.badlogic.gdx.graphics.g3d.materials
Class ColorAttribute

java.lang.Object
  extended by com.badlogic.gdx.graphics.g3d.materials.MaterialAttribute
      extended by com.badlogic.gdx.graphics.g3d.materials.ColorAttribute

public class ColorAttribute
extends MaterialAttribute


Field Summary
 Color color
           
static java.lang.String diffuse
           
static java.lang.String emissive
           
static java.lang.String fog
           
static java.lang.String rim
           
static java.lang.String specular
           
 
Fields inherited from class com.badlogic.gdx.graphics.g3d.materials.MaterialAttribute
isPooled, name
 
Constructor Summary
protected ColorAttribute()
           
  ColorAttribute(Color color, java.lang.String name)
          Creates a MaterialAttribute that is a pure Color.
 
Method Summary
 void bind()
           
 void bind(ShaderProgram program)
           
 MaterialAttribute copy()
           
 void free()
           
 MaterialAttribute pooledCopy()
           
 void set(MaterialAttribute attr)
           
 
Methods inherited from class com.badlogic.gdx.graphics.g3d.materials.MaterialAttribute
getShaderFlag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

diffuse

public static final java.lang.String diffuse
See Also:
Constant Field Values

specular

public static final java.lang.String specular
See Also:
Constant Field Values

emissive

public static final java.lang.String emissive
See Also:
Constant Field Values

rim

public static final java.lang.String rim
See Also:
Constant Field Values

fog

public static final java.lang.String fog
See Also:
Constant Field Values

color

public final Color color
Constructor Detail

ColorAttribute

protected ColorAttribute()

ColorAttribute

public ColorAttribute(Color color,
                      java.lang.String name)
Creates a MaterialAttribute that is a pure Color.

Parameters:
color - The Color that you wish the attribute to represent.
name - The name of the uniform in the ShaderProgram that will have its value set to this color. (A 'name' does not matter for a game that uses GL10).
Method Detail

bind

public void bind()
Specified by:
bind in class MaterialAttribute

bind

public void bind(ShaderProgram program)
Specified by:
bind in class MaterialAttribute

copy

public MaterialAttribute copy()
Specified by:
copy in class MaterialAttribute

set

public void set(MaterialAttribute attr)
Specified by:
set in class MaterialAttribute

pooledCopy

public MaterialAttribute pooledCopy()
Specified by:
pooledCopy in class MaterialAttribute

free

public void free()
Specified by:
free in class MaterialAttribute

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)