]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texturecube.cpp
Use explicit mipmap generation if necessary
[libs/gl.git] / source / texturecube.cpp
index 7f5250ee99e1381195977b1a40e12b77a8220839..37390a853612523e503889230f030f2a70d2b73d 100644 (file)
@@ -67,6 +67,8 @@ void TextureCube::image(TextureCubeFace face, unsigned level, PixelFormat fmt, D
        allocated |= 1<<level;
        if(gen_mipmap && level==0)
        {
+               // TODO Only do this once all faces are created
+               auto_generate_mipmap();
                for(; s; s>>=1, ++level) ;
                allocated |= (1<<level)-1;
        }