X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture.cpp;h=c8a1371c5b0a7724effdeb33ec7f529e70372a47;hb=6afbace895a7bbcf216ab8e48280ea0303ab5892;hp=7ae1a2c2c5bda0e171e6f2ad171646afac48eab5;hpb=3d6188a7f48566398e7ad7548dbd47a68bc73bdc;p=libs%2Fgl.git diff --git a/source/texture.cpp b/source/texture.cpp index 7ae1a2c2..c8a1371c 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -1,5 +1,6 @@ #include #include "error.h" +#include "sgis_generate_mipmap.h" #include "texture.h" #include "texunit.h" @@ -124,6 +125,8 @@ void Texture::set_wrap_r(TextureWrap w) void Texture::set_generate_mipmap(bool gm) { + if(gm) + static Require _req(SGIS_generate_mipmap); gen_mipmap = gm; update_parameter(GENERATE_MIPMAP); }