mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-10 23:38:38 -05:00
ensured master does not care about scene orientation (to make navigation on master easier )
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -162,10 +162,18 @@ void mainPostSyncPreDrawFunc()
|
||||
|
||||
void mainRenderFunc()
|
||||
{
|
||||
//not the most efficient, but for clarity @JK
|
||||
glm::mat4 userMatrix = glm::translate(glm::mat4(1.f), _sgctEngine->getUserPtr()->getPos());
|
||||
glm::mat4 sceneMatrix = _sgctEngine->getModelMatrix();
|
||||
glm::mat4 viewMatrix = _sgctEngine->getActiveViewMatrix() * userMatrix;
|
||||
|
||||
//dont shift nav-direction on master, makes it very tricky to navigate @JK
|
||||
if (!_sgctEngine->isMaster()){
|
||||
viewMatrix = viewMatrix * sceneMatrix;
|
||||
}
|
||||
|
||||
glm::mat4 projectionMatrix = _sgctEngine->getActiveProjectionMatrix();
|
||||
OsEng.render(projectionMatrix, viewMatrix);
|
||||
OsEng.render(projectionMatrix, viewMatrix);
|
||||
}
|
||||
|
||||
void mainPostDrawFunc()
|
||||
|
||||
@@ -386,7 +386,7 @@ namespace openspace {
|
||||
_mainCamera->setProjectionMatrix(
|
||||
projectionMatrix);
|
||||
|
||||
//Is this really necessary to store?
|
||||
//Is this really necessary to store? @JK
|
||||
_mainCamera->setViewProjectionMatrix(projectionMatrix * viewMatrix);
|
||||
|
||||
// render the scene starting from the root node
|
||||
|
||||
Reference in New Issue
Block a user