Renderer: Add support for device-enabled features (anisotropic filtering)

This commit is contained in:
Jérôme Leclercq
2021-06-05 19:51:48 +02:00
parent 0411271851
commit 86097b331b
14 changed files with 104 additions and 120 deletions

View File

@@ -49,6 +49,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))
m_deviceInfo.features.anisotropicFiltering = true;
// Limits
GLint minUboOffsetAlignment;
m_referenceContext->glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &minUboOffsetAlignment);