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

@@ -16,7 +16,7 @@
package com.badlogic.gdx.backends.gwt;
import org.oscim.gdx.client.GwtGLAdapter;
import org.oscim.gdx.client.GdxGL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -91,7 +91,7 @@ public class GwtGraphics implements Graphics {
log.error("Missing gl extension for WEBKIT_WEBGL_depth_texture");
}
this.gl = config.useDebugGL ? new GwtGL20Debug(context) : new GwtGLAdapter(context);
this.gl = config.useDebugGL ? new GwtGL20Debug(context) : new GdxGL(context);
}
public static native double getDevicePixelRatioJSNI() /*-{

View File

@@ -17,6 +17,8 @@
package org.oscim.renderer;
import static org.oscim.backend.GLAdapter.gl;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
@@ -295,7 +297,7 @@ public class GLMatrix {
buffer.clear();
buffer.put(val, 0, 16);
buffer.position(0);
MapRenderer.GL.glUniformMatrix4fv(location, 1, false, buffer);
gl.uniformMatrix4fv(location, 1, false, buffer);
}
/**