public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, size, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, size, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, size, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuffer) ((IntBuffer)type).put(typeTmp.get(1)); return name; }
@Override public void glGetActiveUniform(int program, int index, int bufsize, int[] length, int lengthOffset, int[] size, int sizeOffset, int[] type, int typeOffset, byte[] name, int nameOffset) { bufs.resizeIntBuffer(2); // Return name, length final String nameString = GL20.glGetActiveUniform(program, index, 256, bufs.intBuffer); try { final byte[] nameBytes = nameString.getBytes("UTF-8"); final int nameLength = nameBytes.length - nameOffset; bufs.setByteBuffer(nameBytes, nameOffset, nameLength); bufs.byteBuffer.get(name, nameOffset, nameLength); length[lengthOffset] = nameLength; } catch (UnsupportedEncodingException e) { e.printStackTrace(); } // Return size, type bufs.intBuffer.get(size, 0, 1); bufs.intBuffer.get(type, 0, 1); }
@Override public void glGetActiveUniform(int program, int index, int bufsize, int[] length, int lengthOffset, int[] size, int sizeOffset, int[] type, int typeOffset, byte[] name, int nameOffset) { bufs.resizeIntBuffer(2); // Return name, length final String nameString = GL20.glGetActiveUniform(program, index, 256, bufs.intBuffer); try { final byte[] nameBytes = nameString.getBytes("UTF-8"); final int nameLength = nameBytes.length - nameOffset; bufs.setByteBuffer(nameBytes, nameOffset, nameLength); bufs.byteBuffer.get(name, nameOffset, nameLength); length[lengthOffset] = nameLength; } catch (UnsupportedEncodingException e) { e.printStackTrace(); } // Return size, type bufs.intBuffer.get(size, 0, 1); bufs.intBuffer.get(type, 0, 1); }
buffer_name.rewind(); GL20.glGetActiveUniform( id, index, buffer_length, buffer_size, buffer_type, buffer_name);
buffer_name.rewind(); GL20.glGetActiveUniform( id, index, buffer_length, buffer_size, buffer_type, buffer_name);
/** * Returns information about an active uniform variable for the specified program object. * * @param program the program object to be queried * @param index the index of the uniform variable to be queried * @param size the size of the uniform variable * @param type the data type of the uniform variable * * @see <a target="_blank" href="http://docs.gl/gl4/glGetActiveUniform">Reference Page</a> */ @NativeType("void") public static String glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { return glGetActiveUniform(program, index, glGetProgrami(program, GL_ACTIVE_UNIFORM_MAX_LENGTH), size, type); }