Example usage for org.lwjgl.opengl GL20 glUniform3f

List of usage examples for org.lwjgl.opengl GL20 glUniform3f

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL20 glUniform3f.

Prototype

public static void glUniform3f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0,
        @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2) 

Source Link

Document

Specifies the value of a vec3 uniform variable for the current program object.

Usage

From source file:wrath.client.graphics.ShaderProgram.java

License:Open Source License

/**
 * Sets the value of a uniform variable in the shader.
 * @param location The integer id of the Uniform variable.
 * @param value The value to set./*from  w  w  w. j  a v  a  2s  . co m*/
 */
public void setUniformVariable(int location, Vector3f value) {
    GL20.glUseProgram(programID);
    GL20.glUniform3f(location, value.x, value.y, value.z);
}