mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
0c437492b4
For now, OpenGL and Vulkan renderers are broken as I focused on getting the software renderer working (which was quite tricky to get right). This fixes a couple of issues: the segfault when warping the screen (due to the scene rendering move invalidating the warp buffer), and warp always having 320x200 resolution. There's still the problem of the effect being too subtle at high resolution, but that's just a matter of updating the tables and tweaking the code in D_WarpScreen. Another issue is the Draw functions should probably write directly to the main frame buffer or even one passed in as a parameter. This would remove the need for binding the main buffer at the beginning and end of the frame.
42 lines
1 KiB
C
42 lines
1 KiB
C
#ifndef __vid_gl_h
|
|
#define __vid_gl_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);
|
|
void (*init_gl) (void);
|
|
void *(*get_proc_address) (const char *name, qboolean crit);
|
|
void (*end_rendering) (void);
|
|
|
|
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
|