OpenGLRenderer: enable GL_TEXTURE_CUBE_MAP_SEAMLESS on OpenGL

to match other API behavior
This commit is contained in:
SirLynix 2022-07-02 19:28:20 +02:00
parent 2b4075dc9b
commit a61ebb7806
2 changed files with 5 additions and 0 deletions

View File

@ -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);

View File

@ -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)
{