mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Merge branch 'plutoViz' of openspace.itn.liu.se:/openspace into plutoViz
This commit is contained in:
@@ -75,7 +75,7 @@ public:
|
||||
bool initializeGL();
|
||||
void preSynchronization();
|
||||
void postSynchronizationPreDraw();
|
||||
void render();
|
||||
void render(const glm::mat4 &projectionMatrix, const glm::mat4 &viewMatrix);
|
||||
void postDraw();
|
||||
void keyboardCallback(int key, int action);
|
||||
void charCallback(unsigned int codepoint);
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
bool initializeGL();
|
||||
void postSynchronizationPreDraw();
|
||||
void preSynchronization();
|
||||
void render();
|
||||
void render(const glm::mat4 &projectionMatrix, const glm::mat4 &viewMatrix);
|
||||
void postDraw();
|
||||
|
||||
void takeScreenshot();
|
||||
|
||||
@@ -568,8 +568,8 @@ void OpenSpaceEngine::postSynchronizationPreDraw() {
|
||||
}
|
||||
}
|
||||
|
||||
void OpenSpaceEngine::render() {
|
||||
_renderEngine->render();
|
||||
void OpenSpaceEngine::render(const glm::mat4 &projectionMatrix, const glm::mat4 &viewMatrix) {
|
||||
_renderEngine->render(projectionMatrix, viewMatrix);
|
||||
|
||||
if (sgct::Engine::instance()->isMaster()) {
|
||||
// If currently writing a command, render it to screen
|
||||
@@ -577,7 +577,7 @@ void OpenSpaceEngine::render() {
|
||||
if (sgct::Engine::instance()->isMaster() && !w->isUsingFisheyeRendering() && _console->isVisible()) {
|
||||
_console->render();
|
||||
}
|
||||
|
||||
|
||||
if (_gui->isEnabled())
|
||||
_gui->endFrame();
|
||||
}
|
||||
|
||||
@@ -162,7 +162,10 @@ void mainPostSyncPreDrawFunc()
|
||||
|
||||
void mainRenderFunc()
|
||||
{
|
||||
OsEng.render();
|
||||
glm::mat4 userMatrix = glm::translate(glm::mat4(1.f), _sgctEngine->getUserPtr()->getPos());
|
||||
glm::mat4 viewMatrix = _sgctEngine->getActiveViewMatrix() * userMatrix;
|
||||
glm::mat4 projectionMatrix = _sgctEngine->getActiveProjectionMatrix();
|
||||
OsEng.render(projectionMatrix, viewMatrix);
|
||||
}
|
||||
|
||||
void mainPostDrawFunc()
|
||||
|
||||
@@ -347,7 +347,7 @@ namespace openspace {
|
||||
|
||||
}
|
||||
|
||||
void RenderEngine::render()
|
||||
void RenderEngine::render(const glm::mat4 &projectionMatrix, const glm::mat4 &viewMatrix)
|
||||
{
|
||||
// We need the window pointer
|
||||
sgct::SGCTWindow* w = sgct::Engine::instance()->getActiveWindowPtr();
|
||||
@@ -375,21 +375,19 @@ namespace openspace {
|
||||
= sgct_core::ClusterManager::instance()->getUserPtr()->getPos();
|
||||
#endif
|
||||
//@CHECK does the dome disparity disappear if this line disappears? ---abock
|
||||
const glm::mat4 view
|
||||
= glm::translate(glm::mat4(1.0),
|
||||
eyePosition); // make sure the eye is in the center
|
||||
_mainCamera->setViewProjectionMatrix(
|
||||
sgct::Engine::instance()->getActiveModelViewProjectionMatrix() * view);
|
||||
|
||||
_mainCamera->setModelMatrix(
|
||||
sgct::Engine::instance()->getModelMatrix());
|
||||
//const glm::mat4 view
|
||||
// = glm::translate(glm::mat4(1.0),
|
||||
// eyePosition); // make sure the eye is in the center
|
||||
//
|
||||
|
||||
_mainCamera->setViewMatrix(
|
||||
sgct::Engine::instance()->getActiveViewMatrix()* view);
|
||||
viewMatrix );
|
||||
|
||||
_mainCamera->setProjectionMatrix(
|
||||
sgct::Engine::instance()->getActiveProjectionMatrix());
|
||||
projectionMatrix);
|
||||
|
||||
//Is this really necessary to store?
|
||||
_mainCamera->setViewProjectionMatrix(projectionMatrix * viewMatrix);
|
||||
|
||||
// render the scene starting from the root node
|
||||
if (!_visualizeABuffer) {
|
||||
|
||||
@@ -179,7 +179,7 @@ void RenderableStars::render(const RenderData& data) {
|
||||
// is done twice? ---abock
|
||||
glm::vec2 scaling = glm::vec2(1, -19);
|
||||
|
||||
glm::mat4 modelMatrix = data.camera.modelMatrix();
|
||||
glm::mat4 modelMatrix = glm::mat4(1.0);
|
||||
glm::mat4 viewMatrix = data.camera.viewMatrix();
|
||||
glm::mat4 projectionMatrix = data.camera.projectionMatrix();
|
||||
|
||||
|
||||
@@ -238,6 +238,7 @@ bool ImageSequencer::parsePlaybookFile(const std::string& fileName, std::string
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (extension == "txt"){// Hong Kang. pre-parsed playbook
|
||||
std::cout << "USING PREPARSED PLAYBOOK V9H" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user