[webgl] revert part of previous commit, exposes strange latent bug

This commit is contained in:
Vladimir Vukicevic 2009-12-06 19:29:17 -08:00
parent b4b916d596
commit e76548dd8f

View File

@ -2909,14 +2909,25 @@ WebGLContext::ValidateGL()
// make sure that the opengl stuff that we need is supported
GLint val = 0;
MakeContextCurrent();
// XXX this exposes some strange latent bug; what's going on?
//MakeContextCurrent();
gl->fGetIntegerv(LOCAL_GL_MAX_VERTEX_ATTRIBS, &val);
if (val == 0) {
LogMessage("GL_MAX_VERTEX_ATTRIBS is 0!");
return PR_FALSE;
}
mAttribBuffers.SetLength(val);
//fprintf(stderr, "GL_MAX_VERTEX_ATTRIBS: %d\n", val);
gl->fGetIntegerv(LOCAL_GL_MAX_TEXTURE_UNITS, &val);
if (val == 0) {
LogMessage("GL_MAX_TEXTURE_UNITS is 0!");
return PR_FALSE;
}
mBound2DTextures.SetLength(val);
mBoundCubeMapTextures.SetLength(val);