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

Improve documentation for the Mat4 projection functions #570

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kovaxis
Copy link

@kovaxis kovaxis commented Oct 16, 2024

Like I mentioned in #569, this PR adds more detailed documentation to the Mat4::perspective_* and Mat4::orthographic_* family of functions, as well as adding Mat4::perspective_rh_vk and Mat4::orthographic_rh_vk.

I initially wrote a very detailed doc explaining what world-view coordinates get mapped to what normalized-device-coordinates, but they look very out-of-place and are probably too much. Instead, I added a small subtext among the lines of Useful to map the standard right-handed coordinate system into what OpenGL expects..

I haven't implemented the *_rh_vk functions or their tests yet. I would like to receive confirmation that this PR is ok before doing so.

@bitshifter
Copy link
Owner

Hi, because there are 8 different projection methods currently adding a vk suffix will double that. At some point I'd like to revisit how this is done in glam, probably separating these out into separate modules for handedness and graphics api so users only get one in their project, although realistically I'm not sure when I will get around to that.

Happy to accept the documentation improvements.

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