Renderer: Add pipeline and texture sampler info validation

This commit is contained in:
Jérôme Leclercq
2021-07-09 12:34:38 +02:00
parent 8458301a64
commit 552dfbc01e
19 changed files with 103 additions and 10 deletions

View File

@@ -47,9 +47,16 @@ namespace Nz
return std::make_unique<OpenGLRenderWindow>(owner);
}
std::shared_ptr<RenderDevice> OpenGLRenderer::InstanciateRenderDevice(std::size_t deviceIndex, const RenderDeviceFeatures& /*enabledFeatures*/)
std::shared_ptr<RenderDevice> OpenGLRenderer::InstanciateRenderDevice(std::size_t deviceIndex, const RenderDeviceFeatures& enabledFeatures)
{
assert(deviceIndex == 0);
// For now, since we have to create a device to know its features, supported features are always reported as enabled
// We still call ValidateFeatures in order to trigger warnings if requested features are not supported
// TODO: Report disabled features as disabled (make OpenGLDeviceProxy?)
RenderDeviceFeatures validatedFeatures = enabledFeatures;
OpenGLDevice::ValidateFeatures(m_device->GetEnabledFeatures(), validatedFeatures);
return m_device;
}