lookAt that returns camera matrix instead of view matrix

I can generate the camera matrix as follows: void lookAt(vec3 center) { vec3 f = normalize(center – this->eye); vec3 u(0, 1, 0); vec3 r = normalize(cross(f, u)); u = cross(r, f); this->cameraMatrix = inverse(mat4( r.x, u.x, -f.x, 0, r.y, u.y, -f.y, 0, r.z, u.z, -f.z, 0, -dot(r, this->eye), -dot(u, this->eye), dot(f, this->eye), 1 )); //… Read More lookAt that returns camera matrix instead of view matrix

Object not rendering after adding the third dimension and z axis rotation

I’m adding 3D and some rotation on the z axis to my program which uses OpenGL, CGLM, STB, GLFW and GLAD. The program has no warnings or errors, and still the program’s output is simply my clear colour. The following is the part of my program loop where I apply transformations. // Create transformations mat4… Read More Object not rendering after adding the third dimension and z axis rotation