From 06b442ab58af7549b72ba7cde205c250e65095e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Fri, 9 Jul 2021 12:34:57 +0200 Subject: [PATCH] OpenGLRenderer: Fix depth clamping not being reported as supported --- src/Nazara/OpenGLRenderer/OpenGLDevice.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Nazara/OpenGLRenderer/OpenGLDevice.cpp b/src/Nazara/OpenGLRenderer/OpenGLDevice.cpp index 0a7d3b480..b01a58d10 100644 --- a/src/Nazara/OpenGLRenderer/OpenGLDevice.cpp +++ b/src/Nazara/OpenGLRenderer/OpenGLDevice.cpp @@ -50,12 +50,14 @@ namespace Nz m_deviceInfo.type = RenderDeviceType::Unknown; const GL::ContextParams& params = m_referenceContext->GetParams(); - unsigned int glVersion = params.glMajorVersion * 100 + params.glMinorVersion; // Features - if ((params.type == GL::ContextType::OpenGL && glVersion >= 460) || m_referenceContext->IsExtensionSupported(GL::Extension::TextureFilterAnisotropic)) + if (m_referenceContext->IsExtensionSupported(GL::Extension::TextureFilterAnisotropic)) m_deviceInfo.features.anisotropicFiltering = true; + if (m_referenceContext->IsExtensionSupported(GL::Extension::DepthClamp)) + m_deviceInfo.features.depthClamping = true; + if (m_referenceContext->glPolygonMode) //< not supported in core OpenGL ES, but supported in OpenGL or with GL_NV_polygon_mode extension m_deviceInfo.features.nonSolidFaceFilling = true;