use of org.terasology.engine.rendering.opengl.GLSLMaterial in project Terasology by MovingBlocks.
the class ShaderManagerLwjgl method addShaderProgram.
public GLSLMaterial addShaderProgram(String title, String providingModule) {
String uri = providingModule + ":" + title;
Optional<? extends Shader> shader = Assets.getShader(uri);
checkState(shader.isPresent(), "Failed to resolve %s", uri);
shader.get().recompile();
GLSLMaterial material = (GLSLMaterial) Assets.generateAsset(new ResourceUrn(providingModule + ":prog." + title), new MaterialData(shader.get()), Material.class);
progamaticShaders.add(material);
return material;
}
Aggregations