List of usage examples for com.badlogic.gdx.graphics GL20 GL_UNSIGNED_SHORT
int GL_UNSIGNED_SHORT
To view the source code for com.badlogic.gdx.graphics GL20 GL_UNSIGNED_SHORT.
Click Source Link
From source file:com.watabou.noosa.NoosaScript.java
License:Open Source License
public void drawElements(FloatBuffer vertices, ShortBuffer indices, int size) { vertices.position(0);/*from www . ja va 2 s .c o m*/ aXY.vertexPointer(2, 4, vertices); vertices.position(2); aUV.vertexPointer(2, 4, vertices); Gdx.gl.glDrawElements(GL20.GL_TRIANGLES, size, GL20.GL_UNSIGNED_SHORT, indices); }
From source file:com.watabou.noosa.NoosaScript.java
License:Open Source License
public void drawQuad(FloatBuffer vertices) { vertices.position(0);/*from www. j av a 2 s .c o m*/ aXY.vertexPointer(2, 4, vertices); vertices.position(2); aUV.vertexPointer(2, 4, vertices); Gdx.gl.glDrawElements(GL20.GL_TRIANGLES, Quad.SIZE, GL20.GL_UNSIGNED_SHORT, Quad.INDICES_1); }
From source file:com.watabou.noosa.NoosaScript.java
License:Open Source License
public void drawQuadSet(FloatBuffer vertices, int size) { if (size == 0) { return;// w ww.jav a 2 s .c o m } vertices.position(0); aXY.vertexPointer(2, 4, vertices); vertices.position(2); aUV.vertexPointer(2, 4, vertices); Gdx.gl.glDrawElements(GL20.GL_TRIANGLES, Quad.SIZE * size, GL20.GL_UNSIGNED_SHORT, Quad.getIndices(size)); }