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