]> git.tdb.fi Git - libs/gl.git/commitdiff
Only enable seamless cube map once
authorMikko Rasa <tdb@tdb.fi>
Sat, 18 Sep 2021 11:54:48 +0000 (14:54 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 18 Sep 2021 13:20:18 +0000 (16:20 +0300)
source/core/texturecube.cpp

index 5ee772cab94d742b7939c5373cb36614bca8b4e1..460c109e91879b986129b4ea01ec36a6369c00e2 100644 (file)
@@ -49,7 +49,14 @@ TextureCube::TextureCube():
 {
        static Require _req(ARB_texture_cube_map);
        if(ARB_seamless_cube_map)
-               glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
+       {
+               static bool seamless_init = false;
+               if(!seamless_init)
+               {
+                       glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
+                       seamless_init = true;
+               }
+       }
 }
 
 void TextureCube::storage(PixelFormat fmt, unsigned sz, unsigned lv)