Example usage for com.badlogic.gdx.graphics.g3d.materials Material shaderEquals

List of usage examples for com.badlogic.gdx.graphics.g3d.materials Material shaderEquals

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g3d.materials Material shaderEquals.

Prototype

public boolean shaderEquals(Material other) 

Source Link

Usage

From source file:de.redlion.badminton.render.MaterialShaderHandler.java

License:Apache License

public ShaderProgram getShader(Material material) {
    for (int i = 0; i < materialsWithShader.size; i++) {
        if (material.shaderEquals(materialsWithShader.get(i))) {
            return materialsWithShader.get(i).getShader();
        }//w ww.j a v  a 2s  . c o  m
    }

    materialsWithShader.add(material);
    return ShaderFactory.createShader(material, lightManager);
}