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:
@@ -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() /*-{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user