Skip to content

Commit

Permalink
hslc (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzchen committed Jul 9, 2024
1 parent 20451a9 commit 7b6116d
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 2,371 deletions.
2 changes: 2 additions & 0 deletions camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Camera::Camera(float a_fov, float a_width, float a_height, float a_near, float a
near = a_near;
far = a_far;
mat4x4_perspective(projection, fov, aspect, near, far);
mat4x4_ortho(projection, -3 * aspect, 3 * aspect, -3, 3, near, far);

yaw = 0.0f;
pitch = 0.0f;
Expand Down Expand Up @@ -121,6 +122,7 @@ void Camera::framebufferSizeCallback(GLFWwindow* window, int width, int height)
this->height = height;
this->aspect = (float)width / (float)height;
mat4x4_perspective(this->projection, this->fov, this->aspect, this->near, this->far);
mat4x4_ortho(this->projection, -3 * this->aspect, 3 * this->aspect, -3, 3, this->near, this->far);
}

void Camera::setMousePressed(bool pressed) {
Expand Down
Loading

0 comments on commit 7b6116d

Please sign in to comment.