Move OpenGL runtime classification into renderer backend
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user