<commit_before>/*******************************************************************************
 * This file is part of TERMINAL RECALL
 * Copyright (c) 2012-2014 <NAME>
 * Part of the jTRFP.org project
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     chuck - initial API and implementation
 ******************************************************************************/
package org.jtrfp.trcl.gpu;

import java.nio.IntBuffer;

import javax.media.opengl.GL3;

public class GLUniform {
    private final GLProgram prg;
    private final int uniformID;
    private static GL3 gl;

    GLUniform(GLProgram prg, int uniformID) {
	this.prg = prg;
	this.uniformID = uniformID;
	gl = prg.getGl();
    }

    public GLUniform set(float value) {
	gl.glUniform1f(uniformID, value);
	return this;
    }

    public GLUniform set(int value) {
	gl.glUniform1i(uniformID, value);
	return this;
    }

    public GLUniform setui(int value) {
	gl.glUniform1ui(uniformID, value);
	return this;
    }

    public GLUniform set(float float1, float float2, float float3) {
	gl.glUniform3f(uniformID, float1, float2, float3);
	return this;
    }

    public GLUniform setArrayui(int[] vals) {
	gl.glUniform1uiv(uniformID, vals.length, IntBuffer.wrap(vals));
	return this;
    }

    public GLUniform set4x4Matrix(float[] elements, boolean transpose) {
	gl.glUniformMatrix4fv(uniformID, 1, transpose, elements, 0);
	return this;
    }

    public GLUniform set(float float1, float float2) {
	gl.glUniform2f(uniformID, float1, float2);
	return this;
    }
}// end GLUniform
<commit_msg>Add GLUniform.set(float float float float).<commit_after>/*******************************************************************************
 * This file is part of TERMINAL RECALL
 * Copyright (c) 2012-2014 <NAME>
 * Part of the jTRFP.org project
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     chuck - initial API and implementation
 ******************************************************************************/
package org.jtrfp.trcl.gpu;

import java.nio.IntBuffer;

import javax.media.opengl.GL3;

public class GLUniform {
    private final GLProgram prg;
    private final int uniformID;
    private static GL3 gl;

    GLUniform(GLProgram prg, int uniformID) {
	this.prg = prg;
	this.uniformID = uniformID;
	gl = prg.getGl();
    }

    public GLUniform set(float value) {
	gl.glUniform1f(uniformID, value);
	return this;
    }

    public GLUniform set(int value) {
	gl.glUniform1i(uniformID, value);
	return this;
    }

    public GLUniform setui(int value) {
	gl.glUniform1ui(uniformID, value);
	return this;
    }

    public GLUniform set(float float1, float float2, float float3) {
	gl.glUniform3f(uniformID, float1, float2, float3);
	return this;
    }
    
    public GLUniform set(float float1, float float2, float float3, float float4) {
	gl.glUniform4f(uniformID, float1, float2, float3, float4);
	return this;
    }

    public GLUniform setArrayui(int[] vals) {
	gl.glUniform1uiv(uniformID, vals.length, IntBuffer.wrap(vals));
	return this;
    }

    public GLUniform set4x4Matrix(float[] elements, boolean transpose) {
	gl.glUniformMatrix4fv(uniformID, 1, transpose, elements, 0);
	return this;
    }

    public GLUniform set(float float1, float float2) {
	gl.glUniform2f(uniformID, float1, float2);
	return this;
    }
}// end GLUniform

{'fraction_non_alphanumeric': 0.17243214475784993, 'fraction_numerical': 0.019957424161788185, 'mean_word_length': 4.12125340599455, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6979346', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1140, 'n_words': 335}