mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
Ensure target and browser always are visible together by using the enabled flag
This commit is contained in:
@@ -113,6 +113,13 @@ namespace openspace {
|
||||
// The projection plane seems to be located at z = -2.1 so at that place the ScreenSpaceRenderables behaves like
|
||||
// they are in screen space
|
||||
_cartesianPosition.setValue(glm::vec3(_cartesianPosition.value().x, _cartesianPosition.value().y, -2.1f));
|
||||
|
||||
// Always make sure that the target and browser are visible together
|
||||
_enabled.onChange([&]() {
|
||||
if (_skyTarget) {
|
||||
_skyTarget->property("Enabled")->set(_enabled.value());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bool ScreenSpaceSkyBrowser::initializeGL() {
|
||||
|
||||
@@ -92,8 +92,16 @@ namespace openspace {
|
||||
identifier = makeUniqueIdentifier(identifier);
|
||||
setIdentifier(identifier);
|
||||
|
||||
// Projection plane seems to be at -2.1. The browser is at -2.1 and the browser should have precedence over target
|
||||
_cartesianPosition.setValue(glm::vec3(_cartesianPosition.value().x, _cartesianPosition.value().y, -2.11f));
|
||||
|
||||
// Always make sure that the target and browser are visible together
|
||||
_enabled.onChange([&]() {
|
||||
if (_skyBrowser) {
|
||||
_skyBrowser->property("Enabled")->set(_enabled.value());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
void ScreenSpaceSkyTarget::bindTexture() {
|
||||
|
||||
Reference in New Issue
Block a user