From cf1676a405c2a81413fd565bc83331b7a8778eb5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 18 Sep 2021 14:54:48 +0300 Subject: [PATCH] Only enable seamless cube map once --- source/core/texturecube.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/core/texturecube.cpp b/source/core/texturecube.cpp index 5ee772ca..460c109e 100644 --- a/source/core/texturecube.cpp +++ b/source/core/texturecube.cpp @@ -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) -- 2.45.2