List of usage examples for org.lwjgl.opengl ARBUniformBufferObject glGetUniformIndices
public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const **") PointerBuffer uniformNames, @NativeType("GLuint *") int[] uniformIndices)
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public int getUniformIndex(int program, String name) { IntBuffer indicesBuffer = DirectBufferUtilities.allocateDirectBuffer(4).asIntBuffer(); ARBUniformBufferObject.glGetUniformIndices(program, new String[] { name }, indicesBuffer); return indicesBuffer.get(0); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public int[] getUniformIndices(int program, String[] names) { IntBuffer indicesBuffer = DirectBufferUtilities.allocateDirectBuffer(names.length << 2).asIntBuffer(); ARBUniformBufferObject.glGetUniformIndices(program, names, indicesBuffer); int[] indices = new int[names.length]; indicesBuffer.get(indices);/*from ww w . java2s . c om*/ return indices; }