Commit def47501 authored by Michał Król's avatar Michał Król

util: Fix draws in ManifestStencil/Depth.

We only need four vertices to draw a quad
with GL_TRIANGLE_STRIP primitive.

Reviewed-by: Eric Anholt eric@anholt.net
Part-of: <!409>
parent 1c4bf417
Pipeline #259525 passed with stages
in 10 minutes and 3 seconds
......@@ -846,7 +846,7 @@ ManifestStencil::run()
for (int i = 0; i < 8; ++i) {
glStencilFunc(GL_EQUAL, i, 0xff);
glUniform4fv(color_loc, 1, colors[i]);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 6);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
glDisable(GL_STENCIL_TEST);
......@@ -940,7 +940,7 @@ ManifestDepth::run()
for (int i = 0; i < 8; ++i) {
glUniform4fv(color_loc, 1, colors[i]);
glUniform1f(depth_loc, float(7 - 2*i)/8);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 6);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
glDisable(GL_STENCIL_TEST);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment