Now able to import stuff properly

This commit is contained in:
Dynamitos
2024-05-06 18:36:16 +02:00
parent 05bb1d0cee
commit af7d624d06
21 changed files with 189 additions and 79 deletions
+12
View File
@@ -31,6 +31,18 @@ Matrix4 Viewport::getProjectionMatrix() const
{
if (fieldOfView > 0.0f)
{
//float h = 1.0 / tan(fieldOfView * 0.5);
//float w = h / (sizeX / static_cast<float>(sizeY));
//float zFar = 1000.0f;
//float zNear = 0.1f;
//float a = -zNear / (zFar - zNear);
//float b = (zNear * zFar) / (zFar - zNear);
//return Matrix4(
// w, 0, 0, 0,
// 0, -h, 0, 0,
// 0, 0, a, b,
// 0, 0, 1, 0
//);
return glm::perspective(fieldOfView, sizeX / static_cast<float>(sizeY), 0.1f, 10000.0f);
}
else