Example usage for org.lwjgl.opengl GL20 glGetActiveUniform

List of usage examples for org.lwjgl.opengl GL20 glGetActiveUniform

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL20 glGetActiveUniform.

Prototype

@NativeType("void")
public static String glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index,
        @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) 

Source Link

Document

Returns information about an active uniform variable for the specified program object.

Usage

From source file:com.badlogic.gdx.backends.jglfw.JglfwGL20.java

License:Apache License

public String glGetActiveUniform(int program, int index, IntBuffer size, Buffer type) {
    return GL20.glGetActiveUniform(program, index, size, (IntBuffer) type);
}

From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL20.java

License:Apache License

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));/*from   w  w w. java 2  s  .  co  m*/
    if (type instanceof IntBuffer)
        ((IntBuffer) type).put(typeTmp.get(1));
    return name;
}

From source file:com.badlogic.gdx.backends.lwjgl.swt.LwjglGL20.java

License:Apache License

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);
    if (type instanceof IntBuffer)
        ((IntBuffer) type).put(typeTmp.get(0));
    return name;// w  w  w.j a  v a 2  s .co m
}

From source file:io.root.gfx.glutils.GL.java

License:Apache License

public static String glGetActiveUniform(int program, int index, IntBuffer size, Buffer type) {
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    String name = GL20.glGetActiveUniform(program, index, 256, typeTmp);
    size.put(typeTmp.get(0));/*from   w w w.  j  a  va2s . c om*/
    if (type instanceof IntBuffer)
        ((IntBuffer) type).put(typeTmp.get(1));
    return name;
}

From source file:net.neilcsmith.praxis.video.opengl.internal.ShaderProgram.java

License:Apache License

private 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);
    if (type instanceof IntBuffer)
        ((IntBuffer) type).put(typeTmp.get(0));
    return name;// ww w  .j  av  a  2s  .  c  o m
}

From source file:org.oscim.gdx.LwjglGL20.java

License:Apache License

public String getActiveUniform(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));/*from w w  w .  j  a va2s . co m*/
    if (type instanceof IntBuffer)
        ((IntBuffer) type).put(typeTmp.get(1));
    return name;
}

From source file:playn.java.JavaGL20.java

License:Apache License

@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);//  w w  w .  jav  a2s .  c o m

    // 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);
}

From source file:processing.lwjgl.PLWJGL.java

License:Open Source License

public String getActiveUniform(int program, int index, IntBuffer size, IntBuffer type) {
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    String name = GL20.glGetActiveUniform(program, index, 256, typeTmp);
    type.put(typeTmp.get(0));/*from   w ww.j  a va2 s  .co m*/
    return name;
}

From source file:processing.opengl.PLWJGL.java

License:Open Source License

@Override
public String getActiveUniform(int program, int index, IntBuffer size, IntBuffer type) {
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    String name = GL20.glGetActiveUniform(program, index, 256, typeTmp);
    type.put(typeTmp.get(0));//from  w w  w .ja  va 2s .c  o  m
    return name;
}

From source file:tk.ivybits.engine.gl.GL.java

License:Open Source License

public static String glGetActiveUniform(int a, int b, int c, IntBuffer d) {
    return GL20.glGetActiveUniform(a, b, c, d);
}