diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-08 19:39:38 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-08 19:39:38 +0400 |
commit | 36094af7a39465dfa57d28f799499b9f556038c3 (patch) | |
tree | 258ccdc93eb77b2ecd0480f95517752146dc9089 | |
parent | 651167090c366b30e38b650fe616e7a25f6732a9 (diff) |
Fix #34908: compressed DDS files did not display properly when their mipmap levels
did not go down to 1x1 image size, need to set GL_TEXTURE_MAX_LEVEL then.
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index c78961e6308..e95bcab5f03 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -794,6 +794,9 @@ int GPU_upload_dxt_texture(ImBuf *ibuf) height >>= 1; } + /* set number of mipmap levels we have, needed in case they don't go down to 1x1 */ + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, i-1); + return TRUE; #else (void)ibuf; |