Skip to content

Instantly share code, notes, and snippets.

@bootstraponline
Created April 28, 2012 17:15
Show Gist options
  • Save bootstraponline/2520340 to your computer and use it in GitHub Desktop.
Save bootstraponline/2520340 to your computer and use it in GitHub Desktop.
LWJGL / PlayN Test
// Code inserted into GLDemo.java (playn-gldemo-core)
final int[] tex = new int[16];
gl.glGetIntegerv(GL20.GL_MAX_TEXTURE_SIZE, tex, 0);
System.out.println(tex[0]);
// Code from JavaGL20.java (playn-java)
@Override
public void glGetIntegerv(int pname, int[] params, int offset) {
final int length = params.length - offset;
resizeIntBuffer(length);
// 0
System.out.println("glGetIntegerv pos before: " + intBuffer.position());
GL11.glGetInteger(pname, intBuffer);
// Still 0
System.out.println("glGetIntegerv pos after: " + intBuffer.position());
intBuffer.get(params, offset, length);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment