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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user