Showing the changes to interface/src/renderer/TextureCache.cpp (1 of 84 files). Show all
Unified · Split
| @@ -114,7 +114,8 @@ GLuint TextureCache::getFileTextureID(const QString& filename) { · 113 unmodified lines | ||
| 114 | 114 | glBindTexture(GL_TEXTURE_2D, id); |
| 115 | 115 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 1, |
| 116 | 116 | GL_BGRA, GL_UNSIGNED_BYTE, image.constBits()); |
| 117 | − glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | |
| 117 | + glGenerateMipmap(GL_TEXTURE_2D); | |
| 118 | + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); | |
| 118 | 119 | glBindTexture(GL_TEXTURE_2D, 0); |
| 119 | 120 | |
| 120 | 121 | _fileTextureIDs.insert(filename, id); |
| @@ -336,7 +337,8 @@ void NetworkTexture::setImage(const QImage& image, const glm::vec4& averageColor · 215 unmodified lines | ||
| 336 | 337 | glBindTexture(GL_TEXTURE_2D, getID()); |
| 337 | 338 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 1, |
| 338 | 339 | GL_BGRA, GL_UNSIGNED_BYTE, image.constBits()); |
| 339 | − glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | |
| 340 | + glGenerateMipmap(GL_TEXTURE_2D); | |
| 341 | + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); | |
| 340 | 342 | glBindTexture(GL_TEXTURE_2D, 0); |
| 341 | 343 | } |
| 342 | 344 | |
| @@ -389,7 +391,8 @@ QSharedPointer<Texture> DilatableNetworkTexture::getDilatedTexture(float dilatio · 46 unmodified lines | ||
| 389 | 391 | glBindTexture(GL_TEXTURE_2D, texture->getID()); |
| 390 | 392 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, dilatedImage.width(), dilatedImage.height(), 1, |
| 391 | 393 | GL_BGRA, GL_UNSIGNED_BYTE, dilatedImage.constBits()); |
| 392 | − glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | |
| 394 | + glGenerateMipmap(GL_TEXTURE_2D); | |
| 395 | + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); | |
| 393 | 396 | glBindTexture(GL_TEXTURE_2D, 0); |
| 394 | 397 | } |
| 395 | 398 | |