mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 17:30:04 -05:00
fov lines, check.
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,6 @@ void RenderablePlanet::render(const RenderData& data)
|
||||
|
||||
// setup the data to the shader
|
||||
// _programObject->setUniform("camdir", camSpaceEye);
|
||||
int shadows = (_target == "SUN") ? 0 : 1;
|
||||
_programObject->setUniform("shadows", shadows);
|
||||
_programObject->setUniform("sun_pos", sun_pos.vec3());
|
||||
_programObject->setUniform("ViewProjection", data.camera.viewProjectionMatrix());
|
||||
_programObject->setUniform("ModelTransform", transform);
|
||||
setPscUniforms(_programObject, &data.camera, data.position);
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <openspace/util/constants.h>
|
||||
#include <openspace/rendering/planets/planetgeometryprojection.h>
|
||||
|
||||
#include <openspace/engine/configurationmanager.h>
|
||||
|
||||
#include <ghoul/io/texture/texturereader.h>
|
||||
//#include <ghoul/opengl/textureunit.h>
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
@@ -55,6 +57,12 @@ namespace {
|
||||
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";
|
||||
}
|
||||
namespace openspace {
|
||||
@@ -100,14 +108,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)
|
||||
@@ -136,8 +144,8 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary&
|
||||
bool loaded = openspace::ImageSequencer::ref().loadSequence(_sequenceDir);
|
||||
if (!loaded) LDEBUG(name + " did not load sequence " + _sequenceDir + " check mod file path");
|
||||
*/
|
||||
//openspace::ImageSequencer::ref().parsePlaybook("C:/Users/michal/playbook", "txt");
|
||||
openspace::ImageSequencer::ref().parsePlaybook("C:/Users/joaki56/Desktop/ProjectionsOfInterest/playbook", "txt");
|
||||
openspace::ImageSequencer::ref().parsePlaybook("C:/Users/michal/playbook", "txt");
|
||||
//openspace::ImageSequencer::ref().parsePlaybook("C:/Users/joaki56/Desktop/ProjectionsOfInterest/playbook", "txt");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -150,11 +158,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();
|
||||
|
||||
@@ -122,7 +122,7 @@ RenderableFov::~RenderableFov(){
|
||||
bool RenderableFov::initialize(){
|
||||
bool completeSuccess = true;
|
||||
if (_programObject == nullptr)
|
||||
completeSuccess &= OsEng.ref().configurationManager().getValue("EphemerisProgram", _programObject);
|
||||
completeSuccess &= OsEng.ref().configurationManager()->getValue("FovProgram", _programObject);
|
||||
|
||||
allocateData();
|
||||
sendToGPU();
|
||||
|
||||
@@ -435,7 +435,7 @@ namespace openspace {
|
||||
|
||||
// GUI PRINT
|
||||
// Using a macro to shorten line length and increase readability
|
||||
#define PrintText(i, format, size, ...) Freetype::print(font, size, static_cast<float>(startY - font_size_mono * i * 2), format, __VA_ARGS__);
|
||||
#define PrintText(i, format, ...) Freetype::print(font, 10, static_cast<float>(startY - font_size_mono * i * 2), format, __VA_ARGS__);
|
||||
#define PrintColorText(i, format, size, color, ...) Freetype::print(font, size, static_cast<float>(startY - font_size_mono * i * 2), color, format, __VA_ARGS__);
|
||||
|
||||
int i = 0;
|
||||
|
||||
@@ -172,7 +172,7 @@ bool SceneGraph::initialize()
|
||||
if (!tmpProgram) return false;
|
||||
tmpProgram->setProgramObjectCallback(cb);
|
||||
_programs.push_back(tmpProgram);
|
||||
OsEng.ref().configurationManager().setValue("fboPassProgram", tmpProgram);
|
||||
OsEng.ref().configurationManager()->setValue("fboPassProgram", tmpProgram);
|
||||
|
||||
// projection program
|
||||
tmpProgram = ProgramObject::Build("projectiveProgram",
|
||||
@@ -181,7 +181,7 @@ bool SceneGraph::initialize()
|
||||
if (!tmpProgram) return false;
|
||||
tmpProgram->setProgramObjectCallback(cb);
|
||||
_programs.push_back(tmpProgram);
|
||||
OsEng.ref().configurationManager().setValue("projectiveProgram", tmpProgram);
|
||||
OsEng.ref().configurationManager()->setValue("projectiveProgram", tmpProgram);
|
||||
|
||||
// pscstandard
|
||||
tmpProgram = ProgramObject::Build("pscstandard",
|
||||
@@ -193,6 +193,15 @@ bool SceneGraph::initialize()
|
||||
_programs.push_back(tmpProgram);
|
||||
OsEng.ref().configurationManager()->setValue("pscShader", tmpProgram);
|
||||
|
||||
// pscstandard
|
||||
tmpProgram = ProgramObject::Build("FovProgram",
|
||||
"${SHADERS}/fov_vs.glsl",
|
||||
"${SHADERS}/fov_fs.glsl");
|
||||
if (!tmpProgram) return false;
|
||||
tmpProgram->setProgramObjectCallback(cb);
|
||||
_programs.push_back(tmpProgram);
|
||||
OsEng.ref().configurationManager()->setValue("FovProgram", tmpProgram);
|
||||
|
||||
// RaycastProgram
|
||||
tmpProgram = ProgramObject::Build("RaycastProgram",
|
||||
"${SHADERS}/exitpoints.vert",
|
||||
|
||||
Reference in New Issue
Block a user