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 {
|
||||
|
||||
@@ -678,6 +678,7 @@ struct OpenGlMeshDeleteDispatch {
|
||||
[[nodiscard]] OpenGlCapabilities detect_opengl_capabilities(
|
||||
std::span<const std::string_view> extensions,
|
||||
OpenGlRuntime runtime) noexcept;
|
||||
[[nodiscard]] OpenGlRuntime opengl_runtime_for_current_build() noexcept;
|
||||
[[nodiscard]] pp::renderer::RenderDeviceFeatures render_device_features(
|
||||
OpenGlCapabilities capabilities) noexcept;
|
||||
[[nodiscard]] OpenGlInitialState panopainter_initial_state() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user