From ff316ec7a76e52572a2e89b691e6b3bba0cafba3 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 13 Feb 2013 18:39:43 -0800 Subject: Implement support for drawBitmapMesh's colors array Change-Id: I3d901f6267c2918771ac30ff55c8d80c3ab5b725 --- libs/hwui/Caches.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libs/hwui/Caches.cpp') diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index 74201d1..88f1d83 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -365,11 +365,12 @@ void Caches::bindPositionVertexPointer(bool force, GLvoid* vertices, GLsizei str } } -void Caches::bindTexCoordsVertexPointer(bool force, GLvoid* vertices) { - if (force || vertices != mCurrentTexCoordsPointer) { +void Caches::bindTexCoordsVertexPointer(bool force, GLvoid* vertices, GLsizei stride) { + if (force || vertices != mCurrentTexCoordsPointer || stride != mCurrentTexCoordsStride) { GLuint slot = currentProgram->texCoords; - glVertexAttribPointer(slot, 2, GL_FLOAT, GL_FALSE, gMeshStride, vertices); + glVertexAttribPointer(slot, 2, GL_FLOAT, GL_FALSE, stride, vertices); mCurrentTexCoordsPointer = vertices; + mCurrentTexCoordsStride = stride; } } @@ -390,7 +391,7 @@ void Caches::enableTexCoordsVertexArray() { } } -void Caches::disbaleTexCoordsVertexArray() { +void Caches::disableTexCoordsVertexArray() { if (mTexCoordsArrayEnabled) { glDisableVertexAttribArray(Program::kBindingTexCoords); mTexCoordsArrayEnabled = false; -- cgit v1.1