package speiger.src.coreengine.rendering.shader.uniform.base;

import org.lwjgl.opengl.GL41;

import speiger.src.coreengine.rendering.shader.uniform.Uniform;
import speiger.src.coreengine.rendering.utils.AllocationTracker;

public class FloatUniform extends Uniform {
	float value;
	
	public FloatUniform(String name, float value) {
		super(name);
		this.value = value;
	}
	
	@Override
	protected void processChanges(int programId, int location) {
		GL41.glProgramUniform1f(programId, location, value);
		AllocationTracker.INSTANCE.addGPUBytes(4L);
	}
}
