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

Fix get current matrix warnings + allow query current Orientation Matrix #2964

Merged

Conversation

tgfrerer
Copy link
Member

@tgfrerer tgfrerer commented May 5, 2014

Two matrix stack related commits:

b5cca6f : fixes compiler warnings by adding a default case to getCurrentMatrix, as discussed with @bilderbuchi in 150e197#commitcomment-6204050

e8da01f : extends getCurrentMatrix to allow querying the current orientation matrix stack. I found this extension necessary in a current project where i had to do calculations with current projection matrix but found that because openFrameworks post-applies an orientation matrix to the projection matrix i had no access to the correct, oriented projection matrix my shaders were using.

* invalid matrix state queries will return identity matrix and error message at ofLogWarning Level
* this allows you to calculate the *oriented projection matrix*  yourself.

Sometimes this is needed, e.g. when you have to transform back from (oriented) screen space to view space.
arturoc added a commit that referenced this pull request May 5, 2014
Fix get current matrix warnings + allow query current Orientation Matrix
@arturoc arturoc merged commit 20bd0fb into openframeworks:master May 5, 2014
@arturoc
Copy link
Member

arturoc commented May 5, 2014

thanks! yeah the orientation matrix is not very standard but i see how it can be useful in certain cases

@bilderbuchi
Copy link
Member

thanks, tim!

@tgfrerer tgfrerer deleted the fix-getCurrentMatrixWarnings branch August 14, 2014 19:04
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

Successfully merging this pull request may close these issues.

None yet

3 participants