Java tutorial
/* * 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 net.betabears.the2dlibrary.graphics.shader; import org.lwjgl.opengl.GL20; public class Uniform4i implements Uniform { private int f0, f1, f2, f3; private Uniform4i() { } public Uniform4i(int f0, int f1, int f2, int f3) { this.f0 = f0; this.f1 = f1; this.f2 = f2; this.f3 = f3; } public int getF0() { return f0; } public void setF0(int f0) { this.f0 = f0; } public int getF1() { return f1; } public void setF1(int f1) { this.f1 = f1; } public int getF2() { return f2; } public void setF2(int f2) { this.f2 = f2; } public int getF3() { return f3; } public void setF3(int f3) { this.f3 = f3; } @Override public void apply(int location) { GL20.glUniform4i(location, f0, f1, f2, f3); } @Override public Class getType() { return Integer.class; } @Override public int getElementCount() { return 4; } }