// Path: src/main/java/yk/senjin/AbstractState.java
// abstract public class AbstractState implements State {
// 
//     public void release() {
//     }
// }
// 
// Path: src/main/java/yk/senjin/shaders/uniforms/UniformVariable.java
// abstract public class UniformVariable {
//     public static UniformVariable createVariable(final String name, final float a, final float b) {
//         return new Uniform2f(name, a, b);
//     }
// 
//     public static UniformVariable createVariable(final String name, final float a, final float b,
//                                                  final float c) {
//         return new Uniform3f(name, a, b, c);
//     }
// 
//     public static UniformVariable createVariable(final String name, final float a, final float b,
//                                                  final float c, final float d) {
//         return new Uniform4f(name, a, b, c, d);
//     }
// 
//     public static UniformVariable createVariable(final String name, final int value) {
//         return new Uniform1i(name, value);
//     }
// 
//     public String name;
// 
//     public int index;
// 
//     public UniformVariable(String name) {
//         this.name = name;
//     }
// 
//     public void setValue(Object o) {
//         BadException.notImplemented();
//     }
// 
//     public void initForProgram(final int program) {
//         index = GL20.glGetUniformLocation(program, ShaderHandler.getBufferedString(name));
//     }
// 
//     abstract public void plug();
// }


import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.ARBShaderObjects;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL32;
import org.lwjgl.opengl.Util;
import yk.jcommon.utils.BadException;
import yk.senjin.AbstractState;
import yk.senjin.shaders.uniforms.UniformVariable;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.*;
import static org.lwjgl.opengl.GL20.glCreateShader;
import static yk.jcommon.utils.BadException.shouldNeverReachHere;
package yk.senjin.shaders;




/**
 * Created by: Yuri Kravchik Date: 2/11/2007 Time: 11:29:31
 */
public class ShaderHandler extends AbstractState {
    public static ShaderHandler currentShader;

    private boolean isLinked;
    public int program = -1;
// Path: src/main/java/yk/senjin/AbstractState.java
// abstract public class AbstractState implements State {
// 
//     public void release() {
//     }
// }
// 
// Path: src/main/java/yk/senjin/shaders/uniforms/UniformVariable.java
// abstract public class UniformVariable {
//     public static UniformVariable createVariable(final String name, final float a, final float b) {
//         return new Uniform2f(name, a, b);
//     }
// 
//     public static UniformVariable createVariable(final String name, final float a, final float b,
//                                                  final float c) {
//         return new Uniform3f(name, a, b, c);
//     }
// 
//     public static UniformVariable createVariable(final String name, final float a, final float b,
//                                                  final float c, final float d) {
//         return new Uniform4f(name, a, b, c, d);
//     }
// 
//     public static UniformVariable createVariable(final String name, final int value) {
//         return new Uniform1i(name, value);
//     }
// 
//     public String name;
// 
//     public int index;
// 
//     public UniformVariable(String name) {
//         this.name = name;
//     }
// 
//     public void setValue(Object o) {
//         BadException.notImplemented();
//     }
// 
//     public void initForProgram(final int program) {
//         index = GL20.glGetUniformLocation(program, ShaderHandler.getBufferedString(name));
//     }
// 
//     abstract public void plug();
// }


// Path: src/main/java/yk/senjin/shaders/ShaderHandler.java
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.ARBShaderObjects;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL32;
import org.lwjgl.opengl.Util;
import yk.jcommon.utils.BadException;
import yk.senjin.AbstractState;
import yk.senjin.shaders.uniforms.UniformVariable;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.*;
import static org.lwjgl.opengl.GL20.glCreateShader;
import static yk.jcommon.utils.BadException.shouldNeverReachHere;

package yk.senjin.shaders;




/**
 * Created by: Yuri Kravchik Date: 2/11/2007 Time: 11:29:31
 */
public class ShaderHandler extends AbstractState {
    public static ShaderHandler currentShader;

    private boolean isLinked;
    public int program = -1;
    public final List<UniformVariable> uniforms = new ArrayList<>();