Skip to content

Commit

Permalink
ofCamera with ortho enabled will respect a lensOffset by translating …
Browse files Browse the repository at this point in the history
…the projection matrix (#6138)
  • Loading branch information
m1keall1son authored and arturoc committed Oct 3, 2018
1 parent fe5f7df commit c1545bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/openFrameworks/3d/ofCamera.cpp
Expand Up @@ -151,7 +151,7 @@ glm::mat4 ofCamera::getProjectionMatrix(const ofRectangle & viewport) const {
const_cast<ofCamera*>(this)->calcClipPlanes(viewport);

if(isOrtho) {
return glm::ortho(
return glm::translate(glm::mat4(), {-lensOffset.x, -lensOffset.y, 0.f}) * glm::ortho(
- viewport.width/2,
+ viewport.width/2,
- viewport.height/2,
Expand Down

0 comments on commit c1545bc

Please sign in to comment.