summaryrefslogtreecommitdiffstats
path: root/opengl/libagl/array.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-08-18 20:06:34 -0700
committerMathias Agopian <mathias@google.com>2010-08-18 20:07:25 -0700
commite3586182ec7a5942b758610fe9d084a82486307e (patch)
treef09fbe370c6f858b3b4706536ccc17f52046538e /opengl/libagl/array.cpp
parent6b5e70b701c311a48daa31c16f08436564c10218 (diff)
downloadframeworks_native-e3586182ec7a5942b758610fe9d084a82486307e.zip
frameworks_native-e3586182ec7a5942b758610fe9d084a82486307e.tar.gz
frameworks_native-e3586182ec7a5942b758610fe9d084a82486307e.tar.bz2
fix [2931718] glDrawArrays skips a triangle when more than 70 vertices are used.
a typo prevented the last 2 vertices of a batch to be copied to the front of the next batch. Instead, the 2 very first vertices were used. Change-Id: I3c344784dac1cef64df2fb6f6efb2f901cc788db
Diffstat (limited to 'opengl/libagl/array.cpp')
-rw-r--r--opengl/libagl/array.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp
index 4997dc8..7fbe9b5 100644
--- a/opengl/libagl/array.cpp
+++ b/opengl/libagl/array.cpp
@@ -685,8 +685,8 @@ static void drawPrimitivesTriangleFanOrStrip(ogles_context_t* c,
} while (num);
}
if (count) {
- v0 = c->vc.vBuffer + 2 + num - 2;
- v1 = c->vc.vBuffer + 2 + num - 1;
+ v0 = c->vc.vBuffer + 2 + vcs - 2;
+ v1 = c->vc.vBuffer + 2 + vcs - 1;
if ((winding&2) == 0) {
// for strips copy back the two last compiled vertices
c->vc.vBuffer[0] = *v0;