mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
495dd759f0
Viewport and FOV updates are now separate so updating one doesn't cause recalculations of the other. Also, perspective setup is now done directly from the tangents of the half angles for fov_x and fov_y making the renderers independent of fov/aspect mode. I imagine things are a bit of a mess with view size changes, and especially screen size changes (not supported yet anyway), and vulkan winds up updating its projection matrices every frame, but everything that's expected to work does (vulkan errors out for fisheye or warp due to frame buffer creation not being supported yet).
12 lines
424 B
C
12 lines
424 B
C
#ifndef __QF_Vulkan_projection_h
|
|
#define __QF_Vulkan_projection_h
|
|
|
|
#include "QF/simd/types.h"
|
|
|
|
void QFV_Orthographic (mat4f_t proj, float xmin, float xmax,
|
|
float ymin, float ymax, float znear, float zfar);
|
|
// fov_x and fov_y are tan(fov/2) for x and y respectively
|
|
void QFV_PerspectiveTan (mat4f_t proj, float fov_x, float fov_y);
|
|
void QFV_PerspectiveCos (mat4f_t proj, float fov);
|
|
|
|
#endif//__QF_Vulkan_projection_h
|