]> git.tdb.fi Git - libs/gl.git/commitdiff
Use seamless cube map filtering if available
authorMikko Rasa <tdb@tdb.fi>
Sat, 24 Apr 2021 21:32:45 +0000 (00:32 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 24 Apr 2021 21:40:09 +0000 (00:40 +0300)
extensions/arb_seamless_cube_map.glext [new file with mode: 0644]
source/core/texturecube.cpp

diff --git a/extensions/arb_seamless_cube_map.glext b/extensions/arb_seamless_cube_map.glext
new file mode 100644 (file)
index 0000000..60f43c5
--- /dev/null
@@ -0,0 +1,4 @@
+extension ARB_seamless_cube_map
+# AMD_seamless_cubemap_per_texture contains the same enum but has orthogonal
+# semantics
+source none
index 1c6c4962e46a1a3eb4b0c8817beed3dcfb726b9f..01820fa8766be6afa5235419c5da9d63062a6388 100644 (file)
@@ -1,4 +1,5 @@
 #include <msp/datafile/collection.h>
+#include <msp/gl/extensions/arb_seamless_cube_map.h>
 #include <msp/gl/extensions/arb_texture_cube_map.h>
 #include <msp/gl/extensions/arb_texture_storage.h>
 #include <msp/io/memory.h>
@@ -49,6 +50,8 @@ TextureCube::TextureCube():
        allocated(0)
 {
        static Require _req(ARB_texture_cube_map);
+       if(ARB_seamless_cube_map)
+               glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
 }
 
 void TextureCube::storage(PixelFormat fmt, unsigned sz, unsigned lv)