Route VR render state through renderer GL

This commit is contained in:
2026-06-03 06:03:28 +02:00
parent 7dcf76c3aa
commit 3e15b2f46c
6 changed files with 162 additions and 13 deletions

View File

@@ -326,6 +326,35 @@ pp::foundation::Status apply_opengl_scissor_test(
return pp::foundation::Status::success();
}
pp::foundation::Status apply_opengl_capability(
std::uint32_t state,
bool enabled,
OpenGlCapabilityDispatch dispatch) noexcept
{
if (dispatch.enable == nullptr || dispatch.disable == nullptr) {
return pp::foundation::Status::invalid_argument("OpenGL capability dispatch callbacks must not be null");
}
if (enabled) {
dispatch.enable(state);
} else {
dispatch.disable(state);
}
return pp::foundation::Status::success();
}
pp::foundation::Status clear_opengl_buffers(
std::uint32_t mask,
OpenGlBufferClearDispatch dispatch) noexcept
{
if (dispatch.clear == nullptr) {
return pp::foundation::Status::invalid_argument("OpenGL buffer clear dispatch callback must not be null");
}
dispatch.clear(mask);
return pp::foundation::Status::success();
}
std::uint32_t extension_count_query() noexcept
{
return gl_num_extensions;