← 输入框|github.com|刷新
Skip to content

setLensOffset doesn't work #153

Open

Description

@sphaero

It does nothing... :(

Activity

  1. sphaero commented on Apr 18, 2013

    @sphaero
    Author

    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);
    
  2. danzeeeman commented on Apr 18, 2013

    @danzeeeman

    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" notifications@github.com 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions