- MatrixStack::projection() = Matrix::perspective(fov, aspect, clip_near, clip_far);
+ float frustum_h = tan(fov/2.0f)*clip_near;
+ float frustum_w = frustum_h*aspect;
+ float left = frustum_w*(frustum_x-1.0f);
+ float right = frustum_w*(frustum_x+1.0f);
+ float bottom = frustum_h*(frustum_y-1.0f);
+ float top = frustum_h*(frustum_y+1.0f);
+ MatrixStack::projection() = Matrix::frustum(left, right, bottom, top, clip_near, clip_far);