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:org.terasology.rendering.shader.ShaderProgram.java
License:Apache License
public void setFloat3(String desc, float f1, float f2, float f3) { enable();//from ww w . j av a2 s .co m int id = GL20.glGetUniformLocation(shaderProgram, desc); GL20.glUniform3f(id, f1, f2, f3); }
From source file:ovh.tgrhavoc.gameengine.core.Shader.java
License:Open Source License
public void setUniform(String name, Vector3f value) { GL20.glUniform3f(uniforms.get(name), value.getX(), value.getY(), value.getZ()); }
From source file:playn.java.JavaGL20.java
License:Apache License
@Override public void glUniform3f(int location, float x, float y, float z) { GL20.glUniform3f(location, x, y, z); }
From source file:processing.lwjgl.PGL.java
License:Open Source License
public void uniform3f(int loc, float value0, float value1, float value2) { GL20.glUniform3f(loc, value0, value1, value2); }
From source file:processing.lwjgl.PLWJGL.java
License:Open Source License
public void uniform3f(int location, float value0, float value1, float value2) { GL20.glUniform3f(location, value0, value1, value2); }
From source file:processing.opengl.PLWJGL.java
License:Open Source License
@Override public void uniform3f(int location, float value0, float value1, float value2) { GL20.glUniform3f(location, value0, value1, value2); }
From source file:renderEngine.ShaderProgram.java
/** * Loads a vector value to the uniform variable in the specified location. * * @param location The location of the uniform variable to which the float * needs to be loaded./*from w w w.j a v a 2 s . co m*/ * @param vector The value that needs to be loaded into the uniform * variable. */ protected void loadVector(int location, Vector3f vector) { GL20.glUniform3f(location, vector.x, vector.y, vector.z); }
From source file:se.angergard.engine.graphics.ShaderProgram.java
License:Apache License
public ShaderProgram setUniformVec3(String uniform, Vector3f v) { GL20.glUniform3f(uniforms.get(uniform), v.getX(), v.getY(), v.getZ()); return this; }
From source file:tk.ivybits.engine.gl.GL.java
License:Open Source License
public static void glUniform3f(int a, float b, float c, float d) { GL20.glUniform3f(a, b, c, d); }
From source file:wrapper.vbo.Vbo.java
License:Open Source License
public void render() { if (vertid != -1) { shader.bind();//from w w w .j a v a 2 s . c o m GL11.glEnable(GL11.GL_BLEND); GL11.glBindTexture(GL11.GL_TEXTURE_2D, texid); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vertid); GL20.glEnableVertexAttribArray(vertexattrib); GL20.glEnableVertexAttribArray(textureattrib); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vertid); GL20.glVertexAttribPointer(vertexattrib, 3, GL11.GL_FLOAT, false, 0, 0); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, texcoordid); GL20.glVertexAttribPointer(textureattrib, 2, GL11.GL_FLOAT, false, 0, 0); GL20.glUniform3f(rotationuniform, rotation_x, rotation_y, rotation_z); GL20.glUniform3f(transformuniform, transformation.x, transformation.y, transformation.z); GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, vertcount); GL20.glDisableVertexAttribArray(vertexattrib); GL20.glDisableVertexAttribArray(textureattrib); GL11.glEnable(GL11.GL_BLEND); shader.unbind(); } else { System.out.println("Error no bound vertid"); return; } }