]> git.tdb.fi Git - libs/gl.git/commitdiff
Mipmap generation requires GL_SGIS_generate_mipmap
authorMikko Rasa <tdb@tdb.fi>
Thu, 9 Aug 2012 07:21:08 +0000 (10:21 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 9 Aug 2012 07:22:57 +0000 (10:22 +0300)
source/texture.cpp

index 7ae1a2c2c5bda0e171e6f2ad171646afac48eab5..57b1b78dee6de407837b3b78d2bf980d189845e6 100644 (file)
@@ -1,5 +1,6 @@
 #include <msp/strings/format.h>
 #include "error.h"
+#include "extension.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 RequireExtension _ext("GL_SGIS_generate_mipmap");
        gen_mipmap = gm;
        update_parameter(GENERATE_MIPMAP);
 }