summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbohu <bohu@google.com>2014-10-14 17:19:39 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-10-14 17:19:39 +0000
commit9c6d37269b85c41203a2f061958922315d55f6ce (patch)
treebad25e95b839e110a6c135cc287dc9cdf70567a6
parent7fa2b92de2058a3556e5f38a135de415bb3d5e45 (diff)
parent40a674e0d0acac87aa25eb9de720dc2fb07d9e4f (diff)
downloadgoldfish-l-preview.tar.gz
Merge "Fix emulator crashes on glDrawElements command"android-l-preview_r2l-preview
-rw-r--r--opengl/system/GLESv2_enc/GL2Encoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/opengl/system/GLESv2_enc/GL2Encoder.cpp b/opengl/system/GLESv2_enc/GL2Encoder.cpp
index 0f5abdda..305806ec 100644
--- a/opengl/system/GLESv2_enc/GL2Encoder.cpp
+++ b/opengl/system/GLESv2_enc/GL2Encoder.cpp
@@ -424,15 +424,15 @@ void GL2Encoder::sendVertexAttributes(GLint first, GLsizei count)
int stride = state->stride == 0 ? state->elementSize : state->stride;
int firstIndex = stride * first;
+ this->m_glBindBuffer_enc(this, GL_ARRAY_BUFFER, state->bufferObject);
if (state->bufferObject == 0) {
this->glVertexAttribPointerData(this, i, state->size, state->type, state->normalized, state->stride,
(unsigned char *)state->data + firstIndex, datalen);
} else {
- this->m_glBindBuffer_enc(this, GL_ARRAY_BUFFER, state->bufferObject);
this->glVertexAttribPointerOffset(this, i, state->size, state->type, state->normalized, state->stride,
(uintptr_t) state->data + firstIndex);
- this->m_glBindBuffer_enc(this, GL_ARRAY_BUFFER, m_state->currentArrayVbo());
}
+ this->m_glBindBuffer_enc(this, GL_ARRAY_BUFFER, m_state->currentArrayVbo());
} else {
this->m_glDisableVertexAttribArray_enc(this, i);
}