mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +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).
46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
#ifndef __vid_gl_h
|
|
#define __vid_gl_h
|
|
|
|
#include "QF/simd/types.h"
|
|
|
|
// GL_context is a pointer to opaque data
|
|
typedef struct GL_context *GL_context;
|
|
|
|
typedef struct gl_ctx_s {
|
|
GL_context context;
|
|
void (*load_gl) (void);
|
|
void (*choose_visual) (struct gl_ctx_s *ctx);
|
|
void (*create_context) (struct gl_ctx_s *ctx, int core);
|
|
void (*init_gl) (void);
|
|
void *(*get_proc_address) (const char *name, qboolean crit);
|
|
void (*end_rendering) (void);
|
|
|
|
mat4f_t projection;
|
|
|
|
int begun;
|
|
double start_time;
|
|
int brush_polys;
|
|
int alias_polys;
|
|
} gl_ctx_t;
|
|
|
|
typedef struct gl_framebuffer_s {
|
|
unsigned handle;
|
|
unsigned color;
|
|
unsigned depth;
|
|
} gl_framebuffer_t;
|
|
|
|
extern gl_ctx_t *gl_ctx;
|
|
extern gl_ctx_t *glsl_ctx;
|
|
|
|
struct tex_s *gl_SCR_CaptureBGR (void);
|
|
struct tex_s *glsl_SCR_CaptureBGR (void);
|
|
|
|
void gl_Fog_SetupFrame (void);
|
|
void gl_Fog_EnableGFog (void);
|
|
void gl_Fog_DisableGFog (void);
|
|
void gl_Fog_StartAdditive (void);
|
|
void gl_Fog_StopAdditive (void);
|
|
|
|
void gl_errors (const char *msg);
|
|
|
|
#endif//__vid_gl_h
|