Bug 571054 - emulate vertex attrib 0 on desktop GL - r=vladimir

This commit is contained in:
Benoit Jacob
2010-09-02 10:34:08 -04:00
parent 30ecb76ac5
commit 2fb9fe75d4
5 changed files with 186 additions and 29 deletions

View File

@@ -384,6 +384,11 @@ WebGLContext::InitAndValidateGL()
MakeContextCurrent();
// on desktop OpenGL, we always keep vertex attrib 0 array enabled
if (!gl->IsGLES2()) {
gl->fEnableVertexAttribArray(0);
}
gl->fGetIntegerv(LOCAL_GL_MAX_VERTEX_ATTRIBS, (GLint*) &mGLMaxVertexAttribs);
if (mGLMaxVertexAttribs < 8) {
LogMessage("GL_MAX_VERTEX_ATTRIBS: %d is < 8!", mGLMaxVertexAttribs);