mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-10 23:38:38 -05:00
Feature/dashboard (#431)
Merging Dashboard branch that introduces the Dashboard, DashboardItem and moves most of the screen rendering code into a component-based layout that can also be displayed as a screenspace renderable * Add Onscreen Dashboard * Add Dashboard class * Add DashboardItem classes and subclasses * Added font and fontsize customization to dashboarditems * Add default dashboard specifications to all scenes * Add tests.scene to test dashboard items * Add configuration options to DashboardItemDistance * Fix distance conversion to correctly use singular or plural values * Make DashboardItems unique when adding them to a dashboard * Correctly position test with different font sizes * Add Dashboard Item that enables spacing between other items * Add performance measurement to dashboard rendering * Add method to DashboardItemDistance that computes distance to surface * Add DashboardItemAngle that computes and prints the angle between three objects * Add DashboardItemInstruments that shows the instruments on New Horizons * Add ability to OpenSpaceModules to return a list of Luascripts defined by child objects * Make it possible for ScreenSpaceDashboard to work with its own dashboard or the main one
This commit is contained in:
@@ -238,7 +238,6 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary
|
||||
addProperty(_depth);
|
||||
addProperty(_scale);
|
||||
addProperty(_alpha);
|
||||
addProperty(_delete);
|
||||
|
||||
if (dictionary.hasKey(EnabledInfo.identifier)) {
|
||||
_enabled = dictionary.value<bool>(EnabledInfo.identifier);
|
||||
@@ -298,9 +297,10 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary
|
||||
"openspace.removeScreenSpaceRenderable('" + name() + "');";
|
||||
OsEng.scriptEngine().queueScript(
|
||||
script,
|
||||
scripting::ScriptEngine::RemoteScripting::Yes
|
||||
scripting::ScriptEngine::RemoteScripting::No
|
||||
);
|
||||
});
|
||||
addProperty(_delete);
|
||||
}
|
||||
|
||||
bool ScreenSpaceRenderable::initialize() {
|
||||
@@ -506,6 +506,7 @@ void ScreenSpaceRenderable::draw(glm::mat4 modelTransform) {
|
||||
_shader->setUniform("OcclusionDepth", 1.f - _depth);
|
||||
_shader->setUniform("Alpha", _alpha);
|
||||
_shader->setUniform("ModelTransform", modelTransform);
|
||||
|
||||
_shader->setUniform(
|
||||
"ViewProjectionMatrix",
|
||||
OsEng.renderEngine().camera()->viewProjectionMatrix()
|
||||
|
||||
Reference in New Issue
Block a user