diff options
author | Leith Bade <leith@mapbox.com> | 2014-12-02 03:43:04 +1100 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2014-12-02 03:43:04 +1100 |
commit | 5ad094e82352721a0ecc789fc414f3eafa40d357 (patch) | |
tree | 9f0e10095b73db8b6b25d6fef879f24890363620 /src | |
parent | 2800f361424ee84af283fbe7bb73b5afbe264c6e (diff) | |
download | qtlocation-mapboxgl-5ad094e82352721a0ecc789fc414f3eafa40d357.tar.gz |
Fix iOS compile
Diffstat (limited to 'src')
-rw-r--r-- | src/geometry/glyph_atlas.cpp | 2 | ||||
-rw-r--r-- | src/geometry/sprite_atlas.cpp | 2 | ||||
-rw-r--r-- | src/renderer/prerendered_texture.cpp | 2 | ||||
-rw-r--r-- | src/util/raster.cpp | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/src/geometry/glyph_atlas.cpp b/src/geometry/glyph_atlas.cpp index abfde0a556..40459821fd 100644 --- a/src/geometry/glyph_atlas.cpp +++ b/src/geometry/glyph_atlas.cpp @@ -143,7 +143,9 @@ void GlyphAtlas::bind() { if (!texture) { glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); +#ifndef GL_ES_VERSION_2_0 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); +#endif glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); diff --git a/src/geometry/sprite_atlas.cpp b/src/geometry/sprite_atlas.cpp index cc832b2421..7dc8f60ae6 100644 --- a/src/geometry/sprite_atlas.cpp +++ b/src/geometry/sprite_atlas.cpp @@ -201,7 +201,9 @@ void SpriteAtlas::bind(bool linear) { if (!texture) { glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); +#ifndef GL_ES_VERSION_2_0 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); +#endif glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); first = true; diff --git a/src/renderer/prerendered_texture.cpp b/src/renderer/prerendered_texture.cpp index 8d727d3511..dd35f11372 100644 --- a/src/renderer/prerendered_texture.cpp +++ b/src/renderer/prerendered_texture.cpp @@ -37,7 +37,9 @@ void PrerenderedTexture::bindFramebuffer() { if (texture == 0) { glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); +#ifndef GL_ES_VERSION_2_0 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); +#endif glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); diff --git a/src/util/raster.cpp b/src/util/raster.cpp index 40fb440fb2..d6a680c391 100644 --- a/src/util/raster.cpp +++ b/src/util/raster.cpp @@ -48,7 +48,9 @@ void Raster::bind(bool linear) { if (img && !textured) { texture = texturepool.getTextureID(); glBindTexture(GL_TEXTURE_2D, texture); +#ifndef GL_ES_VERSION_2_0 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); +#endif glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, img->getData()); |