mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-12 22:53:27 +00:00
fixed example
This commit is contained in:
@@ -15,8 +15,8 @@ int main()
|
|||||||
float fov = 0;
|
float fov = 0;
|
||||||
float near = 0;
|
float near = 0;
|
||||||
float far = 0;
|
float far = 0;
|
||||||
float viewPortWidth = 0;
|
float view_port_width = 0;
|
||||||
float viewPortHeight = 0;
|
float view_port_height = 0;
|
||||||
|
|
||||||
std::print("Enter camera fov: ");
|
std::print("Enter camera fov: ");
|
||||||
std::cin >> fov;
|
std::cin >> fov;
|
||||||
@@ -28,13 +28,13 @@ int main()
|
|||||||
std::cin >> far;
|
std::cin >> far;
|
||||||
|
|
||||||
std::print("Enter camera screen width: ");
|
std::print("Enter camera screen width: ");
|
||||||
std::cin >> viewPortWidth;
|
std::cin >> view_port_width;
|
||||||
|
|
||||||
std::print("Enter camera screen height: ");
|
std::print("Enter camera screen height: ");
|
||||||
std::cin >> viewPortHeight;
|
std::cin >> view_port_height;
|
||||||
|
|
||||||
const auto mat =
|
const auto mat =
|
||||||
omath::opengl_engine::CalcPerspectiveProjectionMatrix(fov, viewPortWidth / viewPortHeight, near, far);
|
omath::opengl_engine::calc_perspective_projection_matrix(fov, view_port_width / view_port_height, near, far);
|
||||||
|
|
||||||
std::print("{}", mat.ToString());
|
std::print("{}", mat.to_string());
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user