mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 19:29:04 -05:00
Fix asset selection of constellations
This commit is contained in:
@@ -93,6 +93,26 @@ void RenderableConstellationBounds::initialize() {
|
||||
RenderableConstellation::initialize();
|
||||
|
||||
loadVertexFile();
|
||||
|
||||
if (!_assetSelectedConstellations.empty()) {
|
||||
const std::vector<std::string> options = _constellationSelection.options();
|
||||
std::set<std::string> selectedConstellations;
|
||||
|
||||
for (const std::string& s : _assetSelectedConstellations) {
|
||||
const auto it = std::find(options.begin(), options.end(), s);
|
||||
if (it == options.end()) {
|
||||
// The user has specified a mesh name that doesn't exist
|
||||
LWARNINGC(
|
||||
"RenderableConstellation",
|
||||
fmt::format("Option '{}' not found in list of meshes", s)
|
||||
);
|
||||
}
|
||||
else {
|
||||
selectedConstellations.insert(s);
|
||||
}
|
||||
}
|
||||
_constellationSelection = selectedConstellations;
|
||||
}
|
||||
}
|
||||
|
||||
void RenderableConstellationBounds::initializeGL() {
|
||||
@@ -121,9 +141,6 @@ void RenderableConstellationBounds::initializeGL() {
|
||||
glBindVertexArray(0);
|
||||
}
|
||||
|
||||
void RenderableConstellationBounds::deinitialize() {
|
||||
}
|
||||
|
||||
void RenderableConstellationBounds::deinitializeGL() {
|
||||
glDeleteBuffers(1, &_vbo);
|
||||
_vbo = 0;
|
||||
|
||||
Reference in New Issue
Block a user