Bug 664066 - Initialize GL values - r=karlt

This patch initializes by zero the GL max values before we query them, just in case a buggy OpenGL implementation's glGetIntegerv function would fail to set them.

This patch also manually sets the initial values of mPixelStorePackAlignment and mPixelStoreUnpackAlignment as per the spec, rather than querying them from the GL.
This commit is contained in:
Benoit Jacob
2011-06-27 13:27:04 -04:00
parent e411f569e8
commit 8a1b1774c4
2 changed files with 16 additions and 6 deletions

View File

@@ -571,12 +571,6 @@ WebGLContext::InitAndValidateGL()
}
}
GLint i;
gl->fGetIntegerv(LOCAL_GL_PACK_ALIGNMENT, &i);
mPixelStorePackAlignment = i;
gl->fGetIntegerv(LOCAL_GL_UNPACK_ALIGNMENT, &i);
mPixelStoreUnpackAlignment = i;
// Check the shader validator pref
nsCOMPtr<nsIPrefBranch> prefService = do_GetService(NS_PREFSERVICE_CONTRACTID);
NS_ENSURE_TRUE(prefService != nsnull, NS_ERROR_FAILURE);