OpenGLRenderer: Fix depth clamping not being reported as supported

This commit is contained in:
Jérôme Leclercq 2021-07-09 12:34:57 +02:00
parent 552dfbc01e
commit 06b442ab58
1 changed files with 4 additions and 2 deletions

View File

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