Browse Source

GCC 4.5 compatibility: no range-based for.

Vladimír Vondruš 13 years ago
parent
commit
27bbc234d2
  1. 17
      src/AbstractTexture.cpp

17
src/AbstractTexture.cpp

@ -717,13 +717,16 @@ void AbstractTexture::storageImplementationFallback(const GLenum target, const G
} else if(target == GL_TEXTURE_CUBE_MAP) {
Vector2i levelSize = size;
for(GLsizei level = 0; level != levels; ++level) {
for(GLenum face: {GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z})
(this->*image2DImplementation)(face, level, internalFormat, levelSize, format, type, nullptr);
const std::initializer_list<GLenum> faces = {
GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
};
for(auto it = faces.begin(); it != faces.end(); ++it)
(this->*image2DImplementation)(*it, level, internalFormat, levelSize, format, type, nullptr);
levelSize = Math::max(Vector2i(1), levelSize/2);
}

Loading…
Cancel
Save