diff --git a/src/main.cpp b/src/main.cpp index 708df89..1b42efc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -106,12 +106,11 @@ int main() // TODO: add something in a nice eccentric orbit around the moon // make the earth-moon system ParticleMap map; - map.setParticle({"moon", 7.3e22}); map.setParticle({"earth", 5.9e24}); - map.setRelationship("moon", "earth", orbit); - // TODO: there is a bug where re-ordering the visualizers breaks rendering - ParticleVisualizer moonVis(map, "moon", 0.1, litProgram, unlitProgram); + map.setParticle({"moon", 7.3e22}); + map.setRelationship("earth", "moon", orbit); ParticleVisualizer earthVis(map, "earth", 0.2, litProgram, unlitProgram); + ParticleVisualizer moonVis(map, "moon", 0.1, litProgram, unlitProgram); OrbitVisualizer orbitVis(orbit, unlitProgram); // register input diff --git a/src/particlevisualizer.hpp b/src/particlevisualizer.hpp index 19808e2..d16c987 100644 --- a/src/particlevisualizer.hpp +++ b/src/particlevisualizer.hpp @@ -17,7 +17,7 @@ class ParticleVisualizer void updateModelMatrix(); const ParticleMap& _map; - const std::string& _particleId; + const std::string _particleId; Icosphere _sphere; Widget _widget; };