testing tile overlay

This commit is contained in:
Hannes Janetzek
2013-04-02 16:29:00 +02:00
parent 67e79d98b2
commit a87a1b761c
3 changed files with 15 additions and 4 deletions

View File

@@ -294,7 +294,7 @@ public final class PolygonRenderer {
}
}
static void drawOver(Matrices m) {
public static void drawOver(Matrices m) {
if (GLState.useProgram(polygonProgram)) {
GLState.enableVertexArrays(hPolygonVertexPosition, -1);

View File

@@ -106,7 +106,14 @@ public class CustomOverlay extends RenderOverlay {
/* apply view and projection matrices */
// set mvp (tmp) matrix relative to mMapPosition
// i.e. fixed on the map
setMatrix(pos, m);
float ratio = 1f / mMapView.getWidth();
m.mvp.setScale(ratio, ratio, 1);
m.mvp.multiplyMM(m.proj, m.mvp);
// setMatrix(pos, m);
m.mvp.setAsUniform(hMatrixPosition);
// Draw the triangle