Bug 593496 - Fix WebGL textures: conversions, flipping, premultiplication, unpack alignment - r=vladimir

This commit is contained in:
Benoit Jacob
2010-10-15 17:50:15 -04:00
parent ab3b4c6ef8
commit db0cbcb824
7 changed files with 703 additions and 138 deletions

View File

@@ -301,9 +301,6 @@ PRBool WebGLContext::ValidateTexFormatAndType(WebGLenum format, WebGLenum type,
if (type == LOCAL_GL_UNSIGNED_BYTE)
{
switch (format) {
case LOCAL_GL_RED:
case LOCAL_GL_GREEN:
case LOCAL_GL_BLUE:
case LOCAL_GL_ALPHA:
case LOCAL_GL_LUMINANCE:
*texelSize = 1;
@@ -468,6 +465,9 @@ WebGLContext::InitAndValidateGL()
}
}
gl->fGetIntegerv(LOCAL_GL_PACK_ALIGNMENT, (GLint*) &mPixelStorePackAlignment);
gl->fGetIntegerv(LOCAL_GL_UNPACK_ALIGNMENT, (GLint*) &mPixelStoreUnpackAlignment);
// Check the shader validator pref
nsCOMPtr<nsIPrefBranch> prefService = do_GetService(NS_PREFSERVICE_CONTRACTID);
NS_ENSURE_TRUE(prefService != nsnull, NS_ERROR_FAILURE);