libgdx API

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

java.lang.Object
  extended by com.badlogic.gdx.graphics.g3d.materials.Material
All Implemented Interfaces:
java.lang.Iterable<MaterialAttribute>

public class Material
extends java.lang.Object
implements java.lang.Iterable<MaterialAttribute>


Field Summary
protected  boolean hasTexture
          This flag is true if material contain TextureAttribute
protected  java.lang.String name
           
protected  boolean needBlending
          This flag is true if material contain blendingAttribute
protected  ShaderProgram shader
           
 
Constructor Summary
Material()
           
Material(java.lang.String name, Array<MaterialAttribute> attributes)
           
Material(java.lang.String name, MaterialAttribute... attributes)
           
 
Method Summary
 void addAttribute(MaterialAttribute... attributes)
           
 void bind()
           
 void bind(ShaderProgram program)
           
protected  void checkAttributes()
           
 void clearAttributes()
           
 Material copy()
           
 boolean equals(java.lang.Object obj)
           
 MaterialAttribute getAttribute(int index)
           
 java.lang.String getName()
           
 int getNumberOfAttributes()
           
 ShaderProgram getShader()
           
 int hashCode()
           
 boolean hasTexture()
           
 boolean isNeedBlending()
           
 java.util.Iterator<MaterialAttribute> iterator()
           
 void removeAttribute(MaterialAttribute... attributes)
           
 void resetShader()
           
 void setPooled(Material material)
           
 void setShader(ShaderProgram shader)
           
 boolean shaderEquals(Material other)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

needBlending

protected boolean needBlending
This flag is true if material contain blendingAttribute


hasTexture

protected boolean hasTexture
This flag is true if material contain TextureAttribute


shader

protected ShaderProgram shader
Constructor Detail

Material

public Material()

Material

public Material(java.lang.String name,
                Array<MaterialAttribute> attributes)

Material

public Material(java.lang.String name,
                MaterialAttribute... attributes)
Method Detail

checkAttributes

protected void checkAttributes()

bind

public void bind()

bind

public void bind(ShaderProgram program)

getName

public java.lang.String getName()

addAttribute

public void addAttribute(MaterialAttribute... attributes)

removeAttribute

public void removeAttribute(MaterialAttribute... attributes)

clearAttributes

public void clearAttributes()

getAttribute

public MaterialAttribute getAttribute(int index)

getNumberOfAttributes

public int getNumberOfAttributes()

copy

public Material copy()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

shaderEquals

public boolean shaderEquals(Material other)

setPooled

public void setPooled(Material material)

isNeedBlending

public boolean isNeedBlending()

hasTexture

public boolean hasTexture()

getShader

public ShaderProgram getShader()

setShader

public void setShader(ShaderProgram shader)

resetShader

public void resetShader()

iterator

public java.util.Iterator<MaterialAttribute> iterator()
Specified by:
iterator in interface java.lang.Iterable<MaterialAttribute>

libgdx API

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