use same quad indices in Texture- and LineTexRenderer
This commit is contained in:
@@ -33,8 +33,8 @@ public final class SymbolLayer extends TextureLayer {
|
||||
|
||||
SymbolItem symbols;
|
||||
|
||||
private Canvas mCanvas;
|
||||
private Rect mRect = new Rect();
|
||||
private final Canvas mCanvas;
|
||||
private final Rect mRect = new Rect();
|
||||
|
||||
public SymbolLayer() {
|
||||
type = Layer.SYMBOL;
|
||||
@@ -210,6 +210,13 @@ public final class SymbolLayer extends TextureLayer {
|
||||
buf[pos++] = y1;
|
||||
buf[pos++] = u1;
|
||||
buf[pos++] = v2;
|
||||
// bot-left
|
||||
buf[pos++] = tx;
|
||||
buf[pos++] = ty;
|
||||
buf[pos++] = x1;
|
||||
buf[pos++] = y2;
|
||||
buf[pos++] = u1;
|
||||
buf[pos++] = v1;
|
||||
// top-right
|
||||
buf[pos++] = tx;
|
||||
buf[pos++] = ty;
|
||||
@@ -224,13 +231,6 @@ public final class SymbolLayer extends TextureLayer {
|
||||
buf[pos++] = y2;
|
||||
buf[pos++] = u2;
|
||||
buf[pos++] = v1;
|
||||
// bot-left
|
||||
buf[pos++] = tx;
|
||||
buf[pos++] = ty;
|
||||
buf[pos++] = x1;
|
||||
buf[pos++] = y2;
|
||||
buf[pos++] = u1;
|
||||
buf[pos++] = v1;
|
||||
|
||||
// six elements used to draw the four vertices
|
||||
curIndices += TextureRenderer.INDICES_PER_SPRITE;
|
||||
|
||||
@@ -246,6 +246,13 @@ public final class TextLayer extends TextureLayer {
|
||||
buf[pos++] = y1;
|
||||
buf[pos++] = u1;
|
||||
buf[pos++] = v2;
|
||||
// bot-left
|
||||
buf[pos++] = tx;
|
||||
buf[pos++] = ty;
|
||||
buf[pos++] = x3;
|
||||
buf[pos++] = y3;
|
||||
buf[pos++] = u1;
|
||||
buf[pos++] = v1;
|
||||
// top-right
|
||||
buf[pos++] = tx;
|
||||
buf[pos++] = ty;
|
||||
@@ -260,13 +267,7 @@ public final class TextLayer extends TextureLayer {
|
||||
buf[pos++] = y4;
|
||||
buf[pos++] = u2;
|
||||
buf[pos++] = v1;
|
||||
// bot-left
|
||||
buf[pos++] = tx;
|
||||
buf[pos++] = ty;
|
||||
buf[pos++] = x3;
|
||||
buf[pos++] = y3;
|
||||
buf[pos++] = u1;
|
||||
buf[pos++] = v1;
|
||||
|
||||
|
||||
// six indices to draw the four vertices
|
||||
numIndices += TextureRenderer.INDICES_PER_SPRITE;
|
||||
|
||||
Reference in New Issue
Block a user