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

Add API for frustum-based projection #329

Open
Eggbertx opened this issue Jan 7, 2024 · 2 comments
Open

Add API for frustum-based projection #329

Eggbertx opened this issue Jan 7, 2024 · 2 comments

Comments

@Eggbertx
Copy link
Contributor

Eggbertx commented Jan 7, 2024

As it is now, we have orthogonal projection (via Transform#project2D) and frustum projection (via Transform#project3D), but it would be nice to have perspective projection as well. This can be done by using GLM, which also adds other transform and matrix related functions like lookAt (which can use 2D or 3D vertices). It's written in C++, but in my experience, it works reasonably well with plain C.

@fatcerberus
Copy link
Member

Wait, there’s a difference? I always thought perspective and frustum were the same.

@Eggbertx
Copy link
Contributor Author

Actually scratch that, project3D is technically perspective (using FOV, aspect, and near/far values), frustum projection would be using left, right, top, bottom, near, and far planes.

@fatcerberus fatcerberus changed the title Perspective projection Add API for frustum-based projection Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants