nothing much
This commit is contained in:
@@ -85,17 +85,17 @@ public class NoosaScript extends Script {
|
||||
|
||||
public void drawElements( FloatBuffer vertices, ShortBuffer indices, int size ) {
|
||||
if (DeviceCompat.isWeb()) {
|
||||
Gdx.gl30.glBindBuffer(Gdx.gl30.GL_ARRAY_BUFFER, vertexBufferId);
|
||||
activeGL.glBindBuffer(GL20.GL_ARRAY_BUFFER, vertexBufferId);
|
||||
((Buffer)vertices).position( 0 );
|
||||
Gdx.gl30.glBufferSubData(Gdx.gl30.GL_ARRAY_BUFFER, 0, vertices.remaining() * 4, vertices);
|
||||
activeGL.glBufferSubData(GL20.GL_ARRAY_BUFFER, 0, vertices.remaining() * 4, vertices);
|
||||
|
||||
aXY.vertexBuffer(2, 4, 0);
|
||||
aUV.vertexBuffer(2, 4, 2);
|
||||
|
||||
Quad.releaseIndices();
|
||||
Gdx.gl30.glDrawElements( Gdx.gl30.GL_TRIANGLES, size, Gdx.gl30.GL_UNSIGNED_SHORT, indices );
|
||||
activeGL.glDrawElements( GL20.GL_TRIANGLES, size, GL20.GL_UNSIGNED_SHORT, indices );
|
||||
Quad.bindIndices();
|
||||
Gdx.gl30.glBindBuffer(Gdx.gl30.GL_ARRAY_BUFFER, 0);
|
||||
activeGL.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0);
|
||||
} else {
|
||||
((Buffer)vertices).position( 0 );
|
||||
aXY.vertexPointer( 2, 4, vertices );
|
||||
@@ -111,14 +111,14 @@ public class NoosaScript extends Script {
|
||||
|
||||
public void drawQuad( FloatBuffer vertices ) {
|
||||
if (DeviceCompat.isWeb()) {
|
||||
Gdx.gl30.glBindBuffer(Gdx.gl30.GL_ARRAY_BUFFER, vertexBufferId);
|
||||
activeGL.glBindBuffer(GL20.GL_ARRAY_BUFFER, vertexBufferId);
|
||||
((Buffer)vertices).position( 0 );
|
||||
Gdx.gl30.glBufferSubData(Gdx.gl30.GL_ARRAY_BUFFER, 0, vertices.remaining() * 4, vertices);
|
||||
activeGL.glBufferSubData(GL20.GL_ARRAY_BUFFER, 0, vertices.remaining() * 4, vertices);
|
||||
|
||||
Gdx.gl30.glVertexAttribPointer(aXY.location(), 2, Gdx.gl30.GL_FLOAT, false, 4 * 4, 0);
|
||||
Gdx.gl30.glVertexAttribPointer(aUV.location(), 2, Gdx.gl30.GL_FLOAT, false, 4 * 4, 2 * 4);
|
||||
Gdx.gl30.glDrawElements( Gdx.gl30.GL_TRIANGLES, Quad.SIZE, Gdx.gl30.GL_UNSIGNED_SHORT, 0 );
|
||||
Gdx.gl30.glBindBuffer(Gdx.gl30.GL_ARRAY_BUFFER, 0);
|
||||
activeGL.glVertexAttribPointer(aXY.location(), 2, GL20.GL_FLOAT, false, 4 * 4, 0);
|
||||
activeGL.glVertexAttribPointer(aUV.location(), 2, GL20.GL_FLOAT, false, 4 * 4, 2 * 4);
|
||||
activeGL.glDrawElements( GL20.GL_TRIANGLES, Quad.SIZE, GL20.GL_UNSIGNED_SHORT, 0 );
|
||||
activeGL.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0);
|
||||
} else {
|
||||
((Buffer)vertices).position( 0 );
|
||||
aXY.vertexPointer( 2, 4, vertices );
|
||||
@@ -151,16 +151,16 @@ public class NoosaScript extends Script {
|
||||
}
|
||||
|
||||
if (DeviceCompat.isWeb()) {
|
||||
Gdx.gl30.glBindBuffer(Gdx.gl30.GL_ARRAY_BUFFER, vertexBufferId);
|
||||
activeGL.glBindBuffer(GL20.GL_ARRAY_BUFFER, vertexBufferId);
|
||||
((Buffer)vertices).position( 0 );
|
||||
Gdx.gl30.glBufferSubData(Gdx.gl30.GL_ARRAY_BUFFER, 0, vertices.remaining() * 4, vertices);
|
||||
activeGL.glBufferSubData(GL20.GL_ARRAY_BUFFER, 0, vertices.remaining() * 4, vertices);
|
||||
|
||||
Gdx.gl30.glVertexAttribPointer(aXY.location(), 2, Gdx.gl30.GL_FLOAT, false, 4 * 4, 0);
|
||||
Gdx.gl30.glVertexAttribPointer(aUV.location(), 2, Gdx.gl30.GL_FLOAT, false, 4 * 4, 2 * 4);
|
||||
activeGL.glVertexAttribPointer(aXY.location(), 2, GL20.GL_FLOAT, false, 4 * 4, 0);
|
||||
activeGL.glVertexAttribPointer(aUV.location(), 2, GL20.GL_FLOAT, false, 4 * 4, 2 * 4);
|
||||
|
||||
Gdx.gl30.glDrawElements( Gdx.gl30.GL_TRIANGLES, Quad.SIZE * size, Gdx.gl30.GL_UNSIGNED_SHORT, 0 );
|
||||
activeGL.glDrawElements( GL20.GL_TRIANGLES, Quad.SIZE * size, GL20.GL_UNSIGNED_SHORT, 0 );
|
||||
|
||||
Gdx.gl30.glBindBuffer(Gdx.gl30.GL_ARRAY_BUFFER, 0);
|
||||
activeGL.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0);
|
||||
} else {
|
||||
((Buffer)vertices).position( 0 );
|
||||
aXY.vertexPointer( 2, 4, vertices );
|
||||
|
||||
Reference in New Issue
Block a user