Route GL runtime info through renderer GL
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user