Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setLensOffset doesn't work #153

Open
sphaero opened this issue Apr 18, 2013 · 2 comments
Open

setLensOffset doesn't work #153

sphaero opened this issue Apr 18, 2013 · 2 comments

Comments

@sphaero
Copy link

sphaero commented Apr 18, 2013

It does nothing... :(

@sphaero
Copy link
Author

sphaero commented Apr 18, 2013

this is my fix:

diff --git a/libs/openFrameworks/3d/ofCamera.cpp b/libs/openFrameworks/3d/ofCamera.cpp
index c7a00b8..7ddc2ae 100644
--- a/libs/openFrameworks/3d/ofCamera.cpp
+++ b/libs/openFrameworks/3d/ofCamera.cpp
@@ -143,9 +143,10 @@ void ofCamera::begin(ofRectangle viewport) {
                ortho.makeOrthoMatrix(0, viewport.width, 0, viewport.height, nearClip, farClip);
                ofLoadMatrix( ortho );
        } else {
-               ofMatrix4x4 persp;
-               persp.makePerspectiveMatrix( fov, viewport.width/viewport.height, nearClip, farClip
-               ofLoadMatrix( persp );
+               // ofMatrix4x4 persp;
+               //persp.makePerspectiveMatrix( fov, viewport.width/viewport.height, nearClip, farCl
+               ofLoadMatrix( this->getProjectionMatrix(viewport) );
+               //ofLoadMatrix( persp );
        }

        ofSetMatrixMode(OF_MATRIX_MODELVIEW);

@danzeeeman
Copy link
Member

Can you put this in a pull request? Also do you have a test app that shows
how it is broken? Thanks!!
On Apr 18, 2013 5:07 PM, "Arnaud Loonstra" [email protected] wrote:

this is my fix:

diff --git a/libs/openFrameworks/3d/ofCamera.cpp b/libs/openFrameworks/3d/ofCamera.cpp
index c7a00b8..7ddc2ae 100644
--- a/libs/openFrameworks/3d/ofCamera.cpp
+++ b/libs/openFrameworks/3d/ofCamera.cpp
@@ -143,9 +143,10 @@ void ofCamera::begin(ofRectangle viewport) {
ortho.makeOrthoMatrix(0, viewport.width, 0, viewport.height, nearClip, farClip);
ofLoadMatrix( ortho );
} else {

  •           ofMatrix4x4 persp;
    
  •           persp.makePerspectiveMatrix( fov, viewport.width/viewport.height, nearClip, farClip
    
  •           ofLoadMatrix( persp );
    
  •           // ofMatrix4x4 persp;
    
  •           //persp.makePerspectiveMatrix( fov, viewport.width/viewport.height, nearClip, farCl
    
  •           ofLoadMatrix( this->getProjectionMatrix(viewport) );
    
  •           //ofLoadMatrix( persp );
    }
    
    ofSetMatrixMode(OF_MATRIX_MODELVIEW);
    


Reply to this email directly or view it on GitHubhttps://github.com//issues/153#issuecomment-16610166
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants