List of usage examples for org.lwjgl.opengl GL20 nglUniform1iv
public static void nglUniform1iv(int location, int count, long value)
From source file:ar.com.quark.backend.lwjgl.opengl.DesktopGLES20.java
License:Apache License
/** * {@inheritDoc}// w ww . ja v a 2s . c o m */ @Override public void glUniform1iv(int name, Int32Array buffer) { GL20.nglUniform1iv(name, buffer.remaining(), MemoryUtil.memAddress(buffer.<ByteBuffer>data())); }
From source file:com.samrj.devil.gl.ShaderProgram.java
License:Open Source License
/** * Specifies the values of a uniform variable array for this program. Must * be in use. Returns true if and only if the uniform exists and is active. * /*w ww . j a v a 2 s . c om*/ * @param name The name of the uniform array to specify. * @param array An array of values to set the uniform to. * @return Whether or not the uniform exists and is active. */ public boolean uniform1iv(String name, int... array) { if (DGL.currentProgram() != this) throw new IllegalStateException("Program must be in use."); int loc = GL20.glGetUniformLocation(id, name); if (loc < 0) return false; long address = MemStack.wrapi(array); GL20.nglUniform1iv(loc, array.length, address); MemStack.pop(); return true; }