/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package game;

import br.usp.icmc.vicg.gl.core.Light;
import br.usp.icmc.vicg.gl.util.Shader;
import javax.media.opengl.GL3;

/**
 *
 * @author Orlandi
 */
public class Illumination {
    private final Light light;
    
    public Illumination() {
        light = new Light();
    }
    
    public void init(GL3 gl, Shader shader) {
        light.setPosition(new float[]{10, 10, 50, 1.0f});
        light.setAmbientColor(new float[]{0.1f, 0.1f, 0.1f, 1.0f});
        light.setDiffuseColor(new float[]{0.75f, 0.75f, 0.75f, 1.0f});
        light.setSpecularColor(new float[]{0.7f, 0.7f, 0.7f, 1.0f});
        light.init(gl, shader);
    }
    
    public void bind() {
        light.bind();
    }
}

@@ -232,16 +232,58 @@
 .Light;%0A
+import br.usp.icmc.vicg.gl.core.Material;%0A
 import b
@@ -435,16 +435,74 @@
  light;%0A
+    private final Material material;%0A    private float i;%0A
     %0A   
@@ -551,24 +551,86 @@
 ew Light();%0A
+        material = new Material();%0A        %0A        i = 0.0f;%0A
     %7D%0A    %0A 
@@ -716,18 +716,26 @@
 t%5B%5D%7B
-10, 10, 50
+30.0f, 5.0f, -5.0f
 , 1.
@@ -854,26 +854,23 @@
 t%5B%5D%7B
-0.75f, 0.75f, 0.75
+1.0f, 1.0f, 1.0
 f, 1
@@ -923,63 +923,507 @@
 t%5B%5D%7B
-0.7f, 0.7f, 0.7f, 1.0f%7D);%0A        light.init(gl, shader
+1.0f, 1.0f, 1.0f, 1.0f%7D);%0A        %0A        light.setConstantAttenuation(1.0f);%0A        light.setLinearAttenuation(0.15f);%0A        light.setQuadraticAttenuation(0.1f);%0A        light.init(gl, shader);%0A        %0A        material.init(gl, shader);%0A        material.setAmbientColor(new float%5B%5D%7B0.1f, 0.1f, 0.1f, 1.0f%7D);%0A        material.setDiffuseColor(new float%5B%5D%7B1.0f, 1.0f, 0.0f, 1.0f%7D);%0A        material.setSpecularColor(new float%5B%5D%7B1.0f, 1.0f, 1.0f, 1.0f%7D);%0A        material.setSpecularExponent(64.0f
 );%0A 
@@ -1475,20 +1475,45 @@
 ght.bind();%0A
+        material.bind();%0A
     %7D%0A%7D%0A

Add material to illumination class