Route GL runtime info through renderer GL

This commit is contained in:
2026-06-03 05:45:08 +02:00
parent b2335b1656
commit 103fe4fb12
6 changed files with 108 additions and 27 deletions

View File

@@ -245,6 +245,22 @@ pp::foundation::Status apply_panopainter_initial_state(OpenGlStateDispatch dispa
return pp::foundation::Status::success();
}
pp::foundation::Result<OpenGlRuntimeInfo> query_opengl_runtime_info(
OpenGlRuntimeInfoDispatch dispatch) noexcept
{
if (dispatch.get_string == nullptr) {
return pp::foundation::Result<OpenGlRuntimeInfo>::failure(
pp::foundation::Status::invalid_argument("OpenGL runtime info string callback must not be null"));
}
return pp::foundation::Result<OpenGlRuntimeInfo>::success(OpenGlRuntimeInfo {
.version = dispatch.get_string(version_string_name()),
.vendor = dispatch.get_string(vendor_string_name()),
.renderer = dispatch.get_string(renderer_string_name()),
.shading_language_version = dispatch.get_string(shading_language_version_string_name()),
});
}
std::uint32_t extension_count_query() noexcept
{
return gl_num_extensions;