mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Added render target size multiplier option.
Fix formatting
This commit is contained in:
parent
1f4f73f860
commit
d91e75b6f7
5 changed files with 42 additions and 2 deletions
|
@ -47,6 +47,11 @@ void OpenXRInterface::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_display_refresh_rate", "refresh_rate"), &OpenXRInterface::set_display_refresh_rate);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "display_refresh_rate"), "set_display_refresh_rate", "get_display_refresh_rate");
|
||||
|
||||
// Render Target size multiplier
|
||||
ClassDB::bind_method(D_METHOD("get_render_target_size_multiplier"), &OpenXRInterface::get_render_target_size_multiplier);
|
||||
ClassDB::bind_method(D_METHOD("set_render_target_size_multiplier", "multiplier"), &OpenXRInterface::set_render_target_size_multiplier);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "render_target_size_multiplier"), "set_render_target_size_multiplier", "get_render_target_size_multiplier");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("is_action_set_active", "name"), &OpenXRInterface::is_action_set_active);
|
||||
ClassDB::bind_method(D_METHOD("set_action_set_active", "name", "active"), &OpenXRInterface::set_action_set_active);
|
||||
ClassDB::bind_method(D_METHOD("get_action_sets"), &OpenXRInterface::get_action_sets);
|
||||
|
@ -657,6 +662,22 @@ Array OpenXRInterface::get_action_sets() const {
|
|||
return arr;
|
||||
}
|
||||
|
||||
double OpenXRInterface::get_render_target_size_multiplier() const {
|
||||
if (openxr_api == nullptr) {
|
||||
return 1.0;
|
||||
} else {
|
||||
return openxr_api->get_render_target_size_multiplier();
|
||||
}
|
||||
}
|
||||
|
||||
void OpenXRInterface::set_render_target_size_multiplier(double multiplier) {
|
||||
if (openxr_api == nullptr) {
|
||||
return;
|
||||
} else {
|
||||
openxr_api->set_render_target_size_multiplier(multiplier);
|
||||
}
|
||||
}
|
||||
|
||||
Size2 OpenXRInterface::get_render_target_size() {
|
||||
if (openxr_api == nullptr) {
|
||||
return Size2();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue