new project function for projecting Z

someitmes we need to project z only. this function reduces a few calculations and parameters.
This commit is contained in:
Recep Aslantas
2022-10-21 10:20:03 +03:00
parent 45e176680f
commit ba66459708
7 changed files with 118 additions and 0 deletions

View File

@@ -26,6 +26,12 @@ glmc_project(vec3 pos, mat4 m, vec4 vp, vec3 dest) {
glm_project(pos, m, vp, dest);
}
CGLM_EXPORT
float
glmc_project_z(vec3 pos, mat4 m) {
return glm_project_z(pos, m);
}
CGLM_EXPORT
void
glmc_pickmatrix(vec2 center, vec2 size, vec4 vp, mat4 dest) {