diff --git a/include/Nazara/OpenGLRenderer/Wrapper/CoreFunctions.hpp b/include/Nazara/OpenGLRenderer/Wrapper/CoreFunctions.hpp index 12fef446a..2a5099839 100644 --- a/include/Nazara/OpenGLRenderer/Wrapper/CoreFunctions.hpp +++ b/include/Nazara/OpenGLRenderer/Wrapper/CoreFunctions.hpp @@ -19,6 +19,7 @@ #define GL_FILL 0x1B02 #define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 #define GL_SPIR_V_BINARY_ARB 0x9552 +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F typedef void (GL_APIENTRYP PFNGLDRAWBUFFERPROC) (GLenum buf); typedef void (GL_APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode); typedef void (GL_APIENTRYP PFNGLSPECIALIZESHADERPROC) (GLuint shader, const GLchar* pEntryPoint, GLuint numSpecializationConstants, const GLuint* pConstantIndex, const GLuint* pConstantValue); diff --git a/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp b/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp index f2a8908d5..83a863fb9 100644 --- a/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp +++ b/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp @@ -421,6 +421,10 @@ namespace Nz::GL #undef NAZARA_OPENGLRENDERER_EXT_FUNC #undef NAZARA_OPENGLRENDERER_FUNC + // Always enable cubemap sampling (as it's the guaranteed behavior on Vulkan and OpenGL ES 3.0) + if (m_params.type == ContextType::OpenGL && (glVersion >= 320 || m_supportedExtensions.count("GL_ARB_seamless_cube_map"))) + glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); + // If we requested an OpenGL ES context but couldn't create one, check for some compatibility extensions if (params.type == ContextType::OpenGL_ES && m_params.type != params.type) {