mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 08:00:51 +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.
25 lines
605 B
C
25 lines
605 B
C
#ifndef __vid_sw_h
|
|
#define __vid_sw_h
|
|
|
|
#include "QF/qtypes.h"
|
|
|
|
struct vrect_s;
|
|
typedef struct sw_ctx_s {
|
|
void (*choose_visual) (struct sw_ctx_s *ctx);
|
|
void (*create_context) (struct sw_ctx_s *ctx);
|
|
void (*set_palette) (struct sw_ctx_s *ctx, const byte *palette);
|
|
void (*update) (struct sw_ctx_s *ctx, struct vrect_s *rects);
|
|
struct framebuffer_s *framebuffer;
|
|
} sw_ctx_t;
|
|
|
|
typedef struct sw_framebuffer_s {
|
|
byte *color;
|
|
short *depth;
|
|
int rowbytes;
|
|
} sw_framebuffer_t;
|
|
|
|
extern sw_ctx_t *sw_ctx;
|
|
|
|
struct tex_s *sw_SCR_CaptureBGR (void);
|
|
|
|
#endif//__vid_sw_h
|