Example usage for com.badlogic.gdx.graphics.g3d Shader init

List of usage examples for com.badlogic.gdx.graphics.g3d Shader init

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g3d Shader init.

Prototype

void init();

Source Link

Document

Initializes the Shader, must be called before the Shader can be used.

Usage

From source file:com.badlogic.gdx.tests.g3d.shadows.system.classical.Pass1ShaderProvider.java

License:Apache License

@Override
public Shader getShader(Renderable renderable) {
    for (Shader shader : shaders) {
        if (shader.canRender(renderable))
            return shader;
    }/* ww  w .j a v a 2 s. c  o m*/
    final Shader shader = createShader(renderable);
    shader.init();
    shaders.add(shader);
    return shader;
}