List of usage examples for com.badlogic.gdx.graphics.g3d.attributes IntAttribute IntAttribute
public IntAttribute(long type, int value)
From source file:com.mygdx.game.utilities.ModelFactory.java
License:Apache License
public static void createOutlineModel(Model model, Color outlineColor, float fattenAmount) { fatten(model, fattenAmount);//from w w w . ja v a 2 s. c o m for (Material m : model.materials) { m.clear(); m.set(new IntAttribute(IntAttribute.CullFace, Gdx.gl.GL_FRONT)); m.set(ColorAttribute.createDiffuse(outlineColor)); } }
From source file:com.zombie.game.actors.SteeringActor.java
License:Apache License
public void setModelInstance(ModelInstance modelInstance) { this.modelInstance = modelInstance; this.transform = modelInstance.transform.val; for (Material m : modelInstance.materials) { m.set(new IntAttribute(IntAttribute.CullFace, GL20.GL_NONE)); m.set(new FloatAttribute(FloatAttribute.AlphaTest, 0.5f)); m.set(new BlendingAttribute(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA)); }//from w ww . ja va 2 s .com //Get animations if any if (modelInstance.animations.size > 0) { animationController = new AnimationController(modelInstance); animationController.allowSameAnimation = true; animationController.animate(modelInstance.animations.get(0).id, -1, 1f, this, 1f); } }