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,20 +21,18 @@
|
||||
|
||||
package com.watabou.glwrap;
|
||||
|
||||
import android.opengl.GLES20;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
|
||||
public class Renderbuffer {
|
||||
|
||||
public static final int RGBA8 = GLES20.GL_RGBA; // ?
|
||||
public static final int DEPTH16 = GLES20.GL_DEPTH_COMPONENT16;
|
||||
public static final int STENCIL8 = GLES20.GL_STENCIL_INDEX8;
|
||||
public static final int RGBA8 = Gdx.gl.GL_RGBA; // ?
|
||||
public static final int DEPTH16 = Gdx.gl.GL_DEPTH_COMPONENT16;
|
||||
public static final int STENCIL8 = Gdx.gl.GL_STENCIL_INDEX8;
|
||||
|
||||
private int id;
|
||||
|
||||
public Renderbuffer() {
|
||||
int[] buffers = new int[1];
|
||||
GLES20.glGenRenderbuffers( 1, buffers, 0 );
|
||||
id = buffers[0];
|
||||
id = Gdx.gl.glGenRenderbuffer();
|
||||
}
|
||||
|
||||
public int id() {
|
||||
@@ -42,15 +40,14 @@ public class Renderbuffer {
|
||||
}
|
||||
|
||||
public void bind() {
|
||||
GLES20.glBindRenderbuffer( GLES20.GL_RENDERBUFFER, id );
|
||||
Gdx.gl.glBindRenderbuffer( Gdx.gl.GL_RENDERBUFFER, id );
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
int[] buffers = {id};
|
||||
GLES20.glDeleteRenderbuffers( 1, buffers, 0 );
|
||||
Gdx.gl.glDeleteRenderbuffer( id );
|
||||
}
|
||||
|
||||
public void storage( int format, int width, int height ) {
|
||||
GLES20.glRenderbufferStorage( GLES20.GL_RENDERBUFFER, format , width, height );
|
||||
Gdx.gl.glRenderbufferStorage( Gdx.gl.GL_RENDERBUFFER, format , width, height );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user