mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Bug fixes
This commit is contained in:
@@ -79,7 +79,7 @@ RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary)
|
||||
_geometry = planetgeometry::PlanetGeometry::createFromDictionary(geometryDictionary);
|
||||
}
|
||||
|
||||
dictionary.getValue(keyFrame, _target);
|
||||
dictionary.getValue(keyFrame, _frame);
|
||||
|
||||
bool b1 = dictionary.getValue(keyBody, _target);
|
||||
assert(b1 == true);
|
||||
@@ -170,9 +170,9 @@ void RenderablePlanet::render(const RenderData& data)
|
||||
|
||||
// setup the data to the shader
|
||||
// _programObject->setUniform("camdir", camSpaceEye);
|
||||
int shadows = (_target == "SUN") ? 0 : 1;
|
||||
/*int shadows = (_target == "SUN") ? 0 : 1;
|
||||
_programObject->setUniform("shadows", shadows);
|
||||
_programObject->setUniform("sun_pos", sun_pos.vec3());
|
||||
_programObject->setUniform("sun_pos", sun_pos.vec3());*/
|
||||
_programObject->setUniform("ViewProjection", data.camera.viewProjectionMatrix());
|
||||
_programObject->setUniform("ModelTransform", transform);
|
||||
setPscUniforms(_programObject, &data.camera, data.position);
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <openspace/util/spicemanager.h>
|
||||
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/engine/configurationmanager.h>
|
||||
#include <sgct.h>
|
||||
#include <iomanip>
|
||||
#include <string>
|
||||
@@ -54,6 +55,11 @@ namespace {
|
||||
const std::string keyInstrumentNear = "Instrument.Near";
|
||||
const std::string keyInstrumentFar = "Instrument.Far";
|
||||
const std::string keySequenceDir = "Projection.Sequence";
|
||||
const std::string keyFrame = "Frame";
|
||||
const std::string keyGeometry = "Geometry";
|
||||
const std::string keyShading = "PerformShading";
|
||||
|
||||
const std::string keyBody = "Body";
|
||||
|
||||
const std::string _mainFrame = "GALACTIC";
|
||||
}
|
||||
@@ -100,14 +106,14 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary&
|
||||
|
||||
ghoul::Dictionary geometryDictionary;
|
||||
success = dictionary.getValue(
|
||||
constants::renderableplanet::keyGeometry, geometryDictionary);
|
||||
keyGeometry, geometryDictionary);
|
||||
if (success) {
|
||||
geometryDictionary.setValue(constants::scenegraphnode::keyName, name);
|
||||
geometryDictionary.setValue(constants::scenegraph::keyPathModule, path);
|
||||
_geometry = planetgeometryprojection::PlanetGeometryProjection::createFromDictionary(geometryDictionary);
|
||||
}
|
||||
|
||||
dictionary.getValue(constants::renderableplanet::keyFrame, _target);
|
||||
dictionary.getValue(keyFrame, _target);
|
||||
|
||||
// TODO: textures need to be replaced by a good system similar to the geometry as soon
|
||||
// as the requirements are fixed (ab)
|
||||
@@ -150,11 +156,11 @@ bool RenderablePlanetProjection::initialize(){
|
||||
bool completeSuccess = true;
|
||||
if (_programObject == nullptr)
|
||||
completeSuccess
|
||||
&= OsEng.ref().configurationManager().getValue("projectiveProgram", _programObject);
|
||||
&= OsEng.ref().configurationManager()->getValue("projectiveProgram", _programObject);
|
||||
|
||||
if (_fboProgramObject == nullptr)
|
||||
completeSuccess
|
||||
&= OsEng.ref().configurationManager().getValue("fboPassProgram", _fboProgramObject);
|
||||
&= OsEng.ref().configurationManager()->getValue("fboPassProgram", _fboProgramObject);
|
||||
|
||||
loadTexture();
|
||||
loadProjectionTexture();
|
||||
|
||||
Reference in New Issue
Block a user