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

Do not transpose the projection matrix #22

Merged
merged 1 commit into from
May 19, 2024

Conversation

mardy
Copy link
Collaborator

@mardy mardy commented May 17, 2024

The 4x4 projection matrix is correct as-is, there's no need of transposing it. As a matter of fact, transposing it was causing the scene to always be horizontally centered regardless of the left/right planes set on glFrustum().

This went unnoticed until now because most of the examples/tutorials use a simple frustum where both vertical and horizontal coordinates are set to [-1, 1].

The 4x4 projection matrix is correct as-is, there's no need of
transposing it. As a matter of fact, transposing it was causing the
scene to always be horizontally centered regardless of the left/right
planes set on glFrustum().

This went unnoticed until now because most of the examples/tutorials use
a simple frustum where both vertical and horizontal coordinates are set
to [-1, 1].
@mardy mardy mentioned this pull request May 19, 2024
@WinterMute WinterMute merged commit f1a6867 into devkitPro:master May 19, 2024
2 checks passed
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.

2 participants