com.badlogic.gdx.graphics.g3d.materials
Class Material
java.lang.Object
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
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
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
Material
public Material()
Material
public Material(java.lang.String name,
Array<MaterialAttribute> attributes)
Material
public Material(java.lang.String name,
MaterialAttribute... attributes)
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>
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)