mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Proposed solution.
This commit is contained in:
@@ -68,6 +68,14 @@ namespace {
|
||||
{ "Points+Lines", RenderingModeLinesPoints }
|
||||
};
|
||||
|
||||
// Fragile! Keep in sync with documentation
|
||||
const std::map<std::string, openspace::Renderable::RenderBin> RenderBinModeConversion = {
|
||||
{ "Background", openspace::Renderable::RenderBin::Background },
|
||||
{ "Opaque", openspace::Renderable::RenderBin::Opaque },
|
||||
{ "Transparent", openspace::Renderable::RenderBin::Transparent},
|
||||
{ "SuperTransparent", openspace::Renderable::RenderBin::SuperTransparent}
|
||||
};
|
||||
|
||||
static const openspace::properties::PropertyOwner::PropertyOwnerInfo
|
||||
AppearanceInfo = {
|
||||
"Appearance",
|
||||
@@ -122,6 +130,13 @@ namespace {
|
||||
"corresponding points (and subpoints) are shown. 'Lines+Points' shows both parts."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo RenderBinModeInfo = {
|
||||
"RenderBinMode",
|
||||
"RenderBin Mode",
|
||||
"Determines if the trails will be rendered after all other elements, including"
|
||||
"atmospheres if needed."
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
@@ -255,6 +270,13 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary)
|
||||
}
|
||||
|
||||
addPropertySubOwner(_appearance);
|
||||
|
||||
if (dictionary.hasKeyAndValue<std::string>(RenderBinModeInfo.identifier)) {
|
||||
openspace::Renderable::RenderBin cfgRenderBin = RenderBinModeConversion.at(
|
||||
dictionary.value<std::string>(RenderBinModeInfo.identifier)
|
||||
);
|
||||
setRenderBin(cfgRenderBin);
|
||||
}
|
||||
}
|
||||
|
||||
void RenderableTrail::initializeGL() {
|
||||
|
||||
Reference in New Issue
Block a user