mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
Feature/screenspace renderables (#830)
* Add ability to position screen space renderables in 3D * Independent face camera setting * More intuitive local rotation * Cleanup * Introduce global and master rotation. Remove DisableSceneOnMaster. Revisit screenspace renderables.
This commit is contained in:
committed by
Alexander Bock
parent
0dcf65ce4f
commit
e78121febc
@@ -134,13 +134,14 @@ void ScreenSpaceFramebuffer::render() {
|
||||
static_cast<GLsizei>(resolution.y)
|
||||
);
|
||||
|
||||
const glm::mat4 rotation = rotationMatrix();
|
||||
const glm::mat4 globalRotation = globalRotationMatrix();
|
||||
const glm::mat4 translation = translationMatrix();
|
||||
const glm::mat4 localRotation = localRotationMatrix();
|
||||
const glm::mat4 scale = glm::scale(
|
||||
scaleMatrix(),
|
||||
glm::vec3((1.f / xratio), (1.f / yratio), 1.f)
|
||||
);
|
||||
const glm::mat4 modelTransform = rotation*translation*scale;
|
||||
const glm::mat4 modelTransform = globalRotation*translation*localRotation*scale;
|
||||
draw(modelTransform);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user