less GL_DETPH_TEST switches
This commit is contained in:
parent
9e84a42177
commit
4ac9fc3b95
@ -210,6 +210,8 @@ public final class PolygonRenderer {
|
|||||||
mStart = mCount;
|
mStart = mCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLState.test(drawClipped, true);
|
||||||
|
|
||||||
Layer l = layer;
|
Layer l = layer;
|
||||||
|
|
||||||
for (; l != null && l.type == Layer.POLYGON; l = l.next) {
|
for (; l != null && l.type == Layer.POLYGON; l = l.next) {
|
||||||
@ -230,8 +232,8 @@ public final class PolygonRenderer {
|
|||||||
glStencilMask(0xFF);
|
glStencilMask(0xFF);
|
||||||
glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO);
|
glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO);
|
||||||
|
|
||||||
if (drawClipped) {
|
if (first && drawClipped) {
|
||||||
GLState.test(true, true);
|
//GLState.test(true, true);
|
||||||
// draw clip-region into depth buffer:
|
// draw clip-region into depth buffer:
|
||||||
// this is used for lines and polygons
|
// this is used for lines and polygons
|
||||||
|
|
||||||
@ -245,7 +247,7 @@ public final class PolygonRenderer {
|
|||||||
|
|
||||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||||
|
|
||||||
if (drawClipped) {
|
if (first && drawClipped) {
|
||||||
first = false;
|
first = false;
|
||||||
// do not modify depth buffer anymore
|
// do not modify depth buffer anymore
|
||||||
glDepthMask(false);
|
glDepthMask(false);
|
||||||
@ -258,7 +260,7 @@ public final class PolygonRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// no need for depth test while drawing stencil
|
// no need for depth test while drawing stencil
|
||||||
GLState.test(false, true);
|
//GLState.test(false, true);
|
||||||
|
|
||||||
mFillPolys[mCount] = pl;
|
mFillPolys[mCount] = pl;
|
||||||
|
|
||||||
@ -270,8 +272,8 @@ public final class PolygonRenderer {
|
|||||||
// draw up to 8 layers into stencil buffer
|
// draw up to 8 layers into stencil buffer
|
||||||
if (mCount == STENCIL_BITS) {
|
if (mCount == STENCIL_BITS) {
|
||||||
/* only draw where nothing was drawn yet */
|
/* only draw where nothing was drawn yet */
|
||||||
if (drawClipped)
|
//if (drawClipped)
|
||||||
GLState.test(true, true);
|
// GLState.test(true, true);
|
||||||
|
|
||||||
fillPolygons(zoom, scale);
|
fillPolygons(zoom, scale);
|
||||||
mCount = 0;
|
mCount = 0;
|
||||||
@ -281,8 +283,8 @@ public final class PolygonRenderer {
|
|||||||
|
|
||||||
if (mCount > 0) {
|
if (mCount > 0) {
|
||||||
/* only draw where nothing was drawn yet */
|
/* only draw where nothing was drawn yet */
|
||||||
if (drawClipped)
|
//if (drawClipped)
|
||||||
GLState.test(true, true);
|
// GLState.test(true, true);
|
||||||
|
|
||||||
fillPolygons(zoom, scale);
|
fillPolygons(zoom, scale);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user