diff options
author | Jason Sams <rjsams@android.com> | 2010-01-27 14:48:29 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-01-27 14:48:29 -0800 |
commit | 2060b637f793c1ac969aad85ab0b8e27351ab711 (patch) | |
tree | aa08aa5fb83a1d757e34d357324b0adbc745b0a4 /libs/rs/rsVertexArray.cpp | |
parent | 0ebff76e95aab7f6827ce1a8c25f1b4ad87a9029 (diff) | |
parent | 5dbfe93b3f15f3a837836d024958635fd8f9ad14 (diff) | |
download | frameworks_base-2060b637f793c1ac969aad85ab0b8e27351ab711.zip frameworks_base-2060b637f793c1ac969aad85ab0b8e27351ab711.tar.gz frameworks_base-2060b637f793c1ac969aad85ab0b8e27351ab711.tar.bz2 |
Merge "Fix some minor bugs with GL state setup that were exposed by Droids driver."
Diffstat (limited to 'libs/rs/rsVertexArray.cpp')
-rw-r--r-- | libs/rs/rsVertexArray.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/rs/rsVertexArray.cpp b/libs/rs/rsVertexArray.cpp index a1fd744..d0c0414 100644 --- a/libs/rs/rsVertexArray.cpp +++ b/libs/rs/rsVertexArray.cpp @@ -180,10 +180,12 @@ void VertexArray::setupGL(const Context *rsc, class VertexArrayState *state) con void VertexArray::setupGL2(const Context *rsc, class VertexArrayState *state, ShaderCache *sc) const { - for (int ct=1; ct < RS_MAX_ATTRIBS; ct++) { + rsc->checkError("VertexArray::setupGL2 start"); + for (uint32_t ct=1; ct <= state->mLastEnableCount; ct++) { glDisableVertexAttribArray(ct); } + rsc->checkError("VertexArray::setupGL2 disabled"); for (uint32_t ct=0; ct < mCount; ct++) { uint32_t slot = 0; if (sc->isUserVertexProgram()) { @@ -203,10 +205,12 @@ void VertexArray::setupGL2(const Context *rsc, class VertexArrayState *state, Sh mAttribs[ct].stride, (void *)mAttribs[ct].offset); } - rsc->checkError("VertexArray::setupGL2"); + state->mLastEnableCount = mCount; + rsc->checkError("VertexArray::setupGL2 done"); } //////////////////////////////////////////// void VertexArrayState::init(Context *) { + mLastEnableCount = 0; } |