2019-07-08 16:00:47 +00:00
|
|
|
#ifndef __vid_gl_h
|
|
|
|
#define __vid_gl_h
|
|
|
|
|
2022-03-30 05:55:32 +00:00
|
|
|
#include "QF/simd/types.h"
|
|
|
|
|
2021-03-27 11:09:37 +00:00
|
|
|
// GL_context is a pointer to opaque data
|
|
|
|
typedef struct GL_context *GL_context;
|
2019-07-08 16:00:47 +00:00
|
|
|
|
|
|
|
typedef struct gl_ctx_s {
|
2021-03-27 11:09:37 +00:00
|
|
|
GL_context context;
|
2019-07-08 16:00:47 +00:00
|
|
|
void (*load_gl) (void);
|
|
|
|
void (*choose_visual) (struct gl_ctx_s *ctx);
|
2022-03-24 11:35:29 +00:00
|
|
|
void (*create_context) (struct gl_ctx_s *ctx, int core);
|
2019-07-08 16:00:47 +00:00
|
|
|
void (*init_gl) (void);
|
|
|
|
void *(*get_proc_address) (const char *name, qboolean crit);
|
|
|
|
void (*end_rendering) (void);
|
2022-03-07 14:32:44 +00:00
|
|
|
|
2022-03-30 05:55:32 +00:00
|
|
|
mat4f_t projection;
|
|
|
|
|
2022-03-07 14:32:44 +00:00
|
|
|
int begun;
|
|
|
|
double start_time;
|
|
|
|
int brush_polys;
|
|
|
|
int alias_polys;
|
2019-07-08 16:00:47 +00:00
|
|
|
} gl_ctx_t;
|
|
|
|
|
2022-03-24 03:22:27 +00:00
|
|
|
typedef struct gl_framebuffer_s {
|
|
|
|
unsigned handle;
|
|
|
|
unsigned color;
|
|
|
|
unsigned depth;
|
|
|
|
} gl_framebuffer_t;
|
|
|
|
|
2019-07-08 16:00:47 +00:00
|
|
|
extern gl_ctx_t *gl_ctx;
|
|
|
|
extern gl_ctx_t *glsl_ctx;
|
|
|
|
|
2022-03-07 17:10:47 +00:00
|
|
|
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);
|
|
|
|
|
2022-03-15 03:33:25 +00:00
|
|
|
void gl_errors (const char *msg);
|
|
|
|
|
2019-07-08 16:00:47 +00:00
|
|
|
#endif//__vid_gl_h
|