Code example for FloatBuffer

Methods: clear, position, put

0
	 * Set Matrix with glUniformMatrix 
	 * 
	 * @param location GL location id 
	 */ 
	public void setAsUniform(int location) {
		buffer.clear();
		buffer.put(val, 0, 16);
		buffer.position(0);
		GL = GLAdapter.get();
		GL.glUniformMatrix4fv(location, 1, false, buffer);
	} 
 
	/** 
	 * Set single value 
	 * 
	 * @param pos at position 
	 * @param value value to set 
	 */ 
	public void setValue(int pos, float value) {
		val[pos] = value;
	}