InternalFormat and format are the same.
TRAC #15703
Issue=86
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@580 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index 9ab0abe..08a4be0 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -4412,7 +4412,7 @@
return error(GL_INVALID_OPERATION);
}
- switch (internalformat)
+ switch (format)
{
case GL_ALPHA:
case GL_LUMINANCE:
@@ -4507,8 +4507,8 @@
return error(GL_INVALID_ENUM);
}
- if (internalformat == GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||
- internalformat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT)
+ if (format == GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||
+ format == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT)
{
if (context->supportsCompressedTextures())
{
@@ -4544,7 +4544,7 @@
return error(GL_INVALID_OPERATION);
}
- texture->setImage(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
+ texture->setImage(level, width, height, format, type, context->getUnpackAlignment(), pixels);
}
else
{
@@ -4558,22 +4558,22 @@
switch (target)
{
case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
- texture->setImagePosX(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
+ texture->setImagePosX(level, width, height, format, type, context->getUnpackAlignment(), pixels);
break;
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
- texture->setImageNegX(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
+ texture->setImageNegX(level, width, height, format, type, context->getUnpackAlignment(), pixels);
break;
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
- texture->setImagePosY(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
+ texture->setImagePosY(level, width, height, format, type, context->getUnpackAlignment(), pixels);
break;
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
- texture->setImageNegY(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
+ texture->setImageNegY(level, width, height, format, type, context->getUnpackAlignment(), pixels);
break;
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
- texture->setImagePosZ(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
+ texture->setImagePosZ(level, width, height, format, type, context->getUnpackAlignment(), pixels);
break;
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
- texture->setImageNegZ(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
+ texture->setImageNegZ(level, width, height, format, type, context->getUnpackAlignment(), pixels);
break;
default: UNREACHABLE();
}