2019-07-08 16:00:47 +00:00
|
|
|
#ifndef __vid_sw_h
|
|
|
|
#define __vid_sw_h
|
|
|
|
|
2022-03-24 03:22:27 +00:00
|
|
|
#include "QF/qtypes.h"
|
|
|
|
|
2019-07-08 16:00:47 +00:00
|
|
|
struct vrect_s;
|
|
|
|
typedef struct sw_ctx_s {
|
2022-03-09 05:26:16 +00:00
|
|
|
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);
|
2022-03-24 03:22:27 +00:00
|
|
|
struct framebuffer_s *framebuffer;
|
2019-07-08 16:00:47 +00:00
|
|
|
} sw_ctx_t;
|
|
|
|
|
2022-03-24 03:22:27 +00:00
|
|
|
typedef struct sw_framebuffer_s {
|
|
|
|
byte *color;
|
|
|
|
short *depth;
|
|
|
|
int rowbytes;
|
|
|
|
} sw_framebuffer_t;
|
|
|
|
|
2019-07-08 16:00:47 +00:00
|
|
|
extern sw_ctx_t *sw_ctx;
|
2022-03-09 05:26:16 +00:00
|
|
|
|
2022-03-07 14:32:44 +00:00
|
|
|
struct tex_s *sw_SCR_CaptureBGR (void);
|
|
|
|
|
2019-07-08 16:00:47 +00:00
|
|
|
#endif//__vid_sw_h
|