Share retained GL runtime dispatch adapters

This commit is contained in:
2026-06-06 10:51:46 +02:00
parent ab36af0a8f
commit 6c772a1c84
9 changed files with 64 additions and 61 deletions

View File

@@ -24,6 +24,21 @@ inline const char* query_opengl_indexed_string(std::uint32_t name, std::uint32_t
glGetStringi(static_cast<GLenum>(name), static_cast<GLuint>(index)));
}
inline std::uint32_t query_opengl_error() noexcept
{
return static_cast<std::uint32_t>(glGetError());
}
inline bool has_opengl_debug_message_callback() noexcept
{
return glDebugMessageCallback != nullptr;
}
inline void install_opengl_debug_message_callback(GLDEBUGPROC callback, const void* user_param) noexcept
{
glDebugMessageCallback(callback, user_param);
}
inline pp::renderer::gl::OpenGlRuntimeInfoDispatch runtime_info_dispatch() noexcept
{
return pp::renderer::gl::OpenGlRuntimeInfoDispatch {