Renderer: Add support for device-enabled features (anisotropic filtering)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Nz
|
||||
return std::make_unique<OpenGLRenderWindow>(owner);
|
||||
}
|
||||
|
||||
std::shared_ptr<RenderDevice> OpenGLRenderer::InstanciateRenderDevice(std::size_t deviceIndex)
|
||||
std::shared_ptr<RenderDevice> OpenGLRenderer::InstanciateRenderDevice(std::size_t deviceIndex, const RenderDeviceFeatures& /*enabledFeatures*/)
|
||||
{
|
||||
assert(deviceIndex == 0);
|
||||
return m_device;
|
||||
|
||||
Reference in New Issue
Block a user