diff options
Diffstat (limited to 'gpu/command_buffer/service/gles2_cmd_decoder.cc')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index f145f35..0f6ab3f 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1826,9 +1826,11 @@ bool GLES2DecoderImpl::Initialize(gfx::GLContext* context, glGetIntegerv(GL_ALPHA_BITS, &v); back_buffer_color_format_ = v ? GL_RGBA : GL_RGB; - // We have to enable vertex array 0 on OpenGL or it won't render. Note that - // OpenGL ES 2.0 does not have this issue. - glEnableVertexAttribArray(0); + if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) { + // We have to enable vertex array 0 on OpenGL or it won't render. Note that + // OpenGL ES 2.0 does not have this issue. + glEnableVertexAttribArray(0); + } glGenBuffersARB(1, &attrib_0_buffer_id_); glBindBuffer(GL_ARRAY_BUFFER, attrib_0_buffer_id_); glVertexAttribPointer(0, 1, GL_FLOAT, GL_FALSE, 0, NULL); @@ -2787,7 +2789,8 @@ void GLES2DecoderImpl::DoBindTexture(GLenum target, GLuint client_id) { void GLES2DecoderImpl::DoDisableVertexAttribArray(GLuint index) { if (vertex_attrib_manager_.Enable(index, false)) { - if (index != 0) { + if (index != 0 || + gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2) { glDisableVertexAttribArray(index); } } else { |