Example usage for org.lwjgl.opengl GL20 glGetActiveAttrib

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

Introduction

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

Prototype

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

Source Link

Document

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

Usage

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

License:Apache License

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

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

License:Apache License

public String glGetActiveAttrib(int program, int index, IntBuffer size, Buffer type) {
    // FIXME this is less than ideal of course...
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    String name = GL20.glGetActiveAttrib(program, index, 256, typeTmp);
    size.put(typeTmp.get(0));//w  w  w.  j ava2 s . c om
    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 glGetActiveAttrib(int program, int index, IntBuffer size, Buffer type) {
    // FIXME this is less than ideal of course...
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    String name = GL20.glGetActiveAttrib(program, index, 256, typeTmp);
    if (type instanceof IntBuffer)
        ((IntBuffer) type).put(typeTmp.get(0));
    return name;/*from w  w w.  ja  va  2  s.  com*/
}

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

License:Apache License

public static String glGetActiveAttrib(int program, int index, IntBuffer size, Buffer type) {
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    String name = GL20.glGetActiveAttrib(program, index, 256, typeTmp);
    size.put(typeTmp.get(0));//from  w  ww .java 2 s  . 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 glGetActiveAttrib(int program, int index, IntBuffer size, Buffer type) {
    // FIXME this is less than ideal of course...
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    String name = GL20.glGetActiveAttrib(program, index, 256, typeTmp);
    if (type instanceof IntBuffer)
        ((IntBuffer) type).put(typeTmp.get(0));
    return name;/*from   ww  w .  j ava2 s .co  m*/
}

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

License:Apache License

public String getActiveAttrib(int program, int index, IntBuffer size, Buffer type) {
    // FIXME this is less than ideal of course...
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    String name = GL20.glGetActiveAttrib(program, index, 256, typeTmp);
    size.put(typeTmp.get(0));//from   w  w w . ja v  a2 s.com
    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 glGetActiveAttrib(int program, int index, int bufsize, int[] length, int lengthOffset, int[] size,
        int sizeOffset, int[] type, int typeOffset, byte[] name, int nameOffset) {
    // http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetActiveAttrib.xml
    // Returns length, size, type, name
    bufs.resizeIntBuffer(2);/*from   w  w w  .java  2  s  .co  m*/

    // Return name, length
    final String nameString = GL20.glGetActiveAttrib(program, index, bufsize, 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:playn.java.JavaGL20.java

License:Apache License

@Override
public void glGetActiveAttrib(int program, int index, int bufsize, IntBuffer length, IntBuffer size,
        IntBuffer type, ByteBuffer name) {
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    GL20.glGetActiveAttrib(program, index, 256, typeTmp);
    type.put(typeTmp.get(0));/*  ww w .  j a  v  a  2  s  .c o m*/
    type.rewind();
}

From source file:playn.java.JavaGL20.java

License:Apache License

@Override
public void glGetActiveUniform(int program, int index, int bufsize, IntBuffer length, IntBuffer size,
        IntBuffer type, ByteBuffer name) {
    IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
    GL20.glGetActiveAttrib(program, index, 256, typeTmp);
    type.put(typeTmp.get(0));//from w ww  .j  a v  a  2 s  .  c  o  m
    type.rewind();
}

From source file:processing.lwjgl.PLWJGL.java

License:Open Source License

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