Move OpenGL runtime classification into renderer backend

This commit is contained in:
2026-06-04 19:28:34 +02:00
parent 0489c4229e
commit 11c7d87330
7 changed files with 53 additions and 16 deletions

View File

@@ -201,6 +201,21 @@ OpenGlCapabilities detect_opengl_capabilities(
return capabilities;
}
OpenGlRuntime opengl_runtime_for_current_build() noexcept
{
OpenGlRuntime runtime;
#if defined(PP_RENDERER_GL_RUNTIME_DESKTOP)
runtime.desktop_gl = true;
#endif
#if defined(PP_RENDERER_GL_RUNTIME_GLES)
runtime.gles = true;
#endif
#if defined(PP_RENDERER_GL_RUNTIME_WEB)
runtime.web = true;
#endif
return runtime;
}
pp::renderer::RenderDeviceFeatures render_device_features(OpenGlCapabilities capabilities) noexcept
{
return pp::renderer::RenderDeviceFeatures {