summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 20:00:12 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 20:00:12 +0000
commit1071e57b86dc2cca01a4fe980a1517bbe7e166e9 (patch)
tree870bf0a3a4cbc64964f2b3b37cfbf8057bc1a8f2 /gpu
parent8f4da8c51c2ae2604da5c40e3a6bde4ebe0cfa3a (diff)
downloadchromium_src-1071e57b86dc2cca01a4fe980a1517bbe7e166e9.zip
chromium_src-1071e57b86dc2cca01a4fe980a1517bbe7e166e9.tar.gz
chromium_src-1071e57b86dc2cca01a4fe980a1517bbe7e166e9.tar.bz2
Fixes issue that if we don't simulate a disabled
vertex attrib 0 (as in the case of running on top of OpenGL ES 2.0 or ANGLE) then we actually have to disable it. TEST=updated webgl conformance tests. BUG=71960 Review URL: http://codereview.chromium.org/6456016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc11
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 {