nicer gl api

- java class name should suffice as namespace
- also use import static gl instance seems to work now with Gwt
This commit is contained in:
Hannes Janetzek
2014-10-04 06:48:18 +02:00
parent b2008aa086
commit 846d90f9fe
43 changed files with 2839 additions and 1491 deletions

View File

@@ -1,6 +1,8 @@
package org.oscim.test.gdx.poi3d;
import org.oscim.backend.GL20;
import static org.oscim.backend.GLAdapter.gl;
import org.oscim.backend.GL;
import org.oscim.core.Tile;
import org.oscim.map.Map;
import org.oscim.map.Viewport;
@@ -93,12 +95,12 @@ public class GdxModelRenderer extends LayerRenderer {
// GLUtils.checkGlError(">" + TAG);
GL.glDepthMask(true);
gl.depthMask(true);
if (v.pos.zoomLevel < 16)
GL.glClear(GL20.GL_DEPTH_BUFFER_BIT);
gl.clear(GL.DEPTH_BUFFER_BIT);
GL.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, 0);
gl.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, 0);
// set state that is expected after modelBatch.end();
// modelBatch keeps track of its own state
@@ -168,9 +170,9 @@ public class GdxModelRenderer extends LayerRenderer {
//renderContext.end();
}
GL.glDepthMask(false);
GL.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, 0);
GL.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0);
gl.depthMask(false);
gl.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, 0);
gl.bindBuffer(GL.ARRAY_BUFFER, 0);
}
// @Override