List of usage examples for org.lwjgl.opengl GL20 glUniform3f
public static void glUniform3f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2)
From source file:net.neilcsmith.praxis.video.opengl.internal.ShaderProgram.java
License:Apache License
/** Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a * {@link #begin()}/{@link #end()} block. * //from w w w . ja v a 2s .c om * @param name the name of the uniform * @param value1 the first value * @param value2 the second value * @param value3 the third value */ public void setUniformf(String name, float value1, float value2, float value3) { checkContext(); int location = fetchUniformLocation(name); GL20.glUniform3f(location, value1, value2, value3); }
From source file:net.smert.frameworkgl.opengl.helpers.ShaderUniformHelper.java
License:Apache License
public void setUniform(int uniformID, float value1, float value2, float value3) { GL20.glUniform3f(uniformID, value1, value2, value3); }
From source file:net.smert.frameworkgl.opengl.helpers.ShaderUniformHelper.java
License:Apache License
public void setUniform(int uniformID, int value1, int value2, int value3) { GL20.glUniform3f(uniformID, value1, value2, value3); }
From source file:org.oscim.gdx.LwjglGL20.java
License:Apache License
public void uniform3f(int location, float x, float y, float z) { GL20.glUniform3f(location, x, y, z); }
From source file:org.spout.engine.renderer.shader.variables.Vec3ShaderVariable.java
License:Open Source License
@Override public void assign() { GL20.glUniform3f(location, value.getX(), value.getY(), value.getZ()); }
From source file:org.spout.renderer.lwjgl.gl20.GL20Program.java
License:Open Source License
@Override public void setUniform(String name, Vector3f v) { checkCreated();/*from w w w .j a va2 s .c o m*/ if (!uniforms.containsKey(name)) { return; } GL20.glUniform3f(uniforms.get(name), v.getX(), v.getY(), v.getZ()); LWJGLUtil.checkForGLError(); }
From source file:org.terasology.rendering.assets.GLSLShaderProgramInstance.java
License:Apache License
/** * Sets the shader uniform of the current shader of this shader * program to be the given value.//from w ww . j a v a 2 s . c o m * @param desc the uniform name, as used in the shader program itself. * @param f1 * @param f2 * @param f3 */ public void setFloat3(String desc, float f1, float f2, float f3) { int activeShaderProgramId = getActiveShaderProgramId(); if (activeShaderProgramId <= 0) { return; } enable(); int id = getUniformLocation(activeShaderProgramId, desc); GL20.glUniform3f(id, f1, f2, f3); }
From source file:org.terasology.rendering.assets.GLSLShaderProgramInstance.java
License:Apache License
/** * Sets the shader uniform of the current shader of this shader * program to be the given value./* w w w. java 2s . co m*/ * @param desc the uniform name, as used in the shader program itself. * @param f1 * @param f2 * @param f3 */ public void setFloat3ForAllPermutations(String desc, float f1, float f2, float f3) { TIntIntIterator it = shaderPrograms.iterator(); while (it.hasNext()) { it.advance(); GL20.glUseProgram(it.value()); int id = getUniformLocation(it.value(), desc); GL20.glUniform3f(id, f1, f2, f3); } enable(); }
From source file:org.terasology.rendering.assets.Material.java
License:Apache License
public void setFloat3(String desc, float f1, float f2, float f3) { if (isDisposed()) return;/*from w w w . ja v a 2s. c om*/ enable(); int id = GL20.glGetUniformLocation(shaderProgram, desc); if (id != -1) { GL20.glUniform3f(id, f1, f2, f3); } }
From source file:org.terasology.rendering.opengl.GLSLMaterial.java
License:Apache License
@Override public void setFloat3(String desc, float f1, float f2, float f3, boolean currentOnly) { if (isDisposed()) { return;// w w w.j a va 2 s . c om } if (currentOnly) { enable(); int id = getUniformLocation(getActiveShaderProgramId(), desc); GL20.glUniform3f(id, f1, f2, f3); } else { TIntIntIterator it = shaderPrograms.iterator(); while (it.hasNext()) { it.advance(); GL20.glUseProgram(it.value()); int id = getUniformLocation(it.value(), desc); GL20.glUniform3f(id, f1, f2, f3); } restoreStateAfterUniformsSet(); } }