diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 00:47:13 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 00:47:13 +0000 |
commit | 9d88364cfcdbdcda08f317a488ffdf84227dacc2 (patch) | |
tree | 6ebf34c48c8aafa662506f0ecc29b5a63ee9b678 /o3d | |
parent | 7b78f8a09c29e9a7ebf4ccbe4c9243a40837007f (diff) | |
download | chromium_src-9d88364cfcdbdcda08f317a488ffdf84227dacc2.zip chromium_src-9d88364cfcdbdcda08f317a488ffdf84227dacc2.tar.gz chromium_src-9d88364cfcdbdcda08f317a488ffdf84227dacc2.tar.bz2 |
Fix for GL
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/core/cross/gl/texture_gl.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/o3d/core/cross/gl/texture_gl.cc b/o3d/core/cross/gl/texture_gl.cc index 309a59e..1c57288 100644 --- a/o3d/core/cross/gl/texture_gl.cc +++ b/o3d/core/cross/gl/texture_gl.cc @@ -220,7 +220,7 @@ static bool CreateGLImages(GLenum target, for (unsigned int i = 0; i < levels; ++i) { if (gl_format) { glTexImage2D(target, i, internal_format, mip_width, mip_height, - 0, format, type, temp_data.get()); + 0, gl_format, type, temp_data.get()); if (glGetError() != GL_NO_ERROR) { DLOG(ERROR) << "glTexImage2D failed"; return false; @@ -733,12 +733,6 @@ void TextureCUBEGL::SetRect(TextureCUBE::CubeFace face, unsigned src_height, const void* src_data, int src_pitch) { - if (static_cast<int>(face) < 0 || static_cast<int>(face) >= NUMBER_OF_FACES) { - O3D_ERROR(service_locator()) - << "Trying to SetRect invalid face " << face << " on Texture \"" - << name() << "\""; - return; - } if (level >= levels() || level < 0) { O3D_ERROR(service_locator()) << "Trying to SetRect non-existent level " << level @@ -812,7 +806,7 @@ void TextureCUBEGL::SetRect(TextureCUBE::CubeFace face, } } else { glCompressedTexSubImage2D( - GL_TEXTURE_2D, level, 0, 0, src_width, src_height, + gl_face, level, 0, 0, src_width, src_height, gl_internal_format, image::ComputeMipChainSize(src_width, src_height, format(), 1), src_data); |