v0.7.4b: Initial LibGDX commit! more details below:
Large sections of game logic are now working through libgdx instead of android libraries. There is still work to do but this is the first major step. Big changes include: - Graphics code is now through LibGDX (except for text rendering) - Initialization and screen-handling logic is now mostly through LibGDX - Audio is now through LibGDX - Input handling is now through LibGDX - Most misc functions are now through LibGDX
This commit is contained in:
@@ -21,8 +21,7 @@
|
||||
|
||||
package com.watabou.glwrap;
|
||||
|
||||
import android.opengl.GLES20;
|
||||
import android.os.Build;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
@@ -39,18 +38,18 @@ public class Attribute {
|
||||
}
|
||||
|
||||
public void enable() {
|
||||
GLES20.glEnableVertexAttribArray( location );
|
||||
Gdx.gl.glEnableVertexAttribArray( location );
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
GLES20.glDisableVertexAttribArray( location );
|
||||
Gdx.gl.glDisableVertexAttribArray( location );
|
||||
}
|
||||
|
||||
public void vertexPointer( int size, int stride, FloatBuffer ptr ) {
|
||||
GLES20.glVertexAttribPointer( location, size, GLES20.GL_FLOAT, false, stride * 4, ptr );
|
||||
Gdx.gl.glVertexAttribPointer( location, size, Gdx.gl.GL_FLOAT, false, stride * 4, ptr );
|
||||
}
|
||||
|
||||
public void vertexBuffer( int size, int stride, int offset) {
|
||||
GLES20.glVertexAttribPointer(location, size, GLES20.GL_FLOAT, false, stride * 4, offset * 4);
|
||||
Gdx.gl.glVertexAttribPointer(location, size, Gdx.gl.GL_FLOAT, false, stride * 4, offset * 4);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user