renderer/api: rename ClearBufferFlags to BufferKindFlags
This commit is contained in:
parent
cc05fa5b64
commit
3dc0faec9e
23 changed files with 63 additions and 44 deletions
|
@ -474,7 +474,7 @@ static uint credits_skysphere_pos(Stage3D *s3d, vec3 cam, float maxrange) {
|
|||
}
|
||||
|
||||
static void credits_draw(void) {
|
||||
r_clear(CLEAR_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
r_clear(BUFFER_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
// colorfill(1, 1, 1, 1); // don't use r_clear for this, it screws up letterboxing
|
||||
|
||||
|
||||
|
@ -482,7 +482,7 @@ static void credits_draw(void) {
|
|||
|
||||
r_state_push();
|
||||
r_framebuffer(credits.fb);
|
||||
r_clear(CLEAR_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
r_clear(BUFFER_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
|
||||
r_enable(RCAP_DEPTH_TEST);
|
||||
stage3d_draw(&stage_3d_context, 500, 2, (Stage3DSegment[]) { credits_skysphere_draw, credits_skysphere_pos, credits_towerwall_draw, credits_towerwall_pos });
|
||||
|
|
|
@ -347,20 +347,20 @@ static void draw_text(CutsceneState *st) {
|
|||
|
||||
static RenderFrameAction cutscene_render_frame(void *ctx) {
|
||||
CutsceneState *st = ctx;
|
||||
r_clear(CLEAR_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
r_clear(BUFFER_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
set_ortho(SCREEN_W, SCREEN_H);
|
||||
|
||||
r_state_push();
|
||||
|
||||
r_framebuffer(st->text_fb);
|
||||
r_clear(CLEAR_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
draw_text(st);
|
||||
|
||||
r_shader_standard();
|
||||
r_blend(BLEND_NONE);
|
||||
|
||||
r_framebuffer(st->erase_mask_fbpair.back);
|
||||
r_clear(CLEAR_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
draw_framebuffer_tex(st->text_fb, SCREEN_W, SCREEN_H);
|
||||
fbpair_swap(&st->erase_mask_fbpair);
|
||||
|
||||
|
@ -370,13 +370,13 @@ static RenderFrameAction cutscene_render_frame(void *ctx) {
|
|||
r_uniform_vec2("blur_resolution", mask_vp.w, mask_vp.h);
|
||||
|
||||
r_framebuffer(st->erase_mask_fbpair.back);
|
||||
r_clear(CLEAR_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_uniform_vec2("blur_direction", 1, 0);
|
||||
draw_framebuffer_tex(st->erase_mask_fbpair.front, SCREEN_W, SCREEN_H);
|
||||
fbpair_swap(&st->erase_mask_fbpair);
|
||||
|
||||
r_framebuffer(st->erase_mask_fbpair.back);
|
||||
r_clear(CLEAR_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_uniform_vec2("blur_direction", 0, 1);
|
||||
draw_framebuffer_tex(st->erase_mask_fbpair.front, SCREEN_W, SCREEN_H);
|
||||
fbpair_swap(&st->erase_mask_fbpair);
|
||||
|
|
|
@ -117,7 +117,7 @@ LogicFrameAction handle_logic(LoopFrame **pframe, const FrameTimes *ftimes) {
|
|||
|
||||
RenderFrameAction run_render_frame(LoopFrame *frame) {
|
||||
attr_unused LoopFrame *stack_prev = evloop.stack_ptr;
|
||||
r_framebuffer_clear(NULL, CLEAR_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
r_framebuffer_clear(NULL, BUFFER_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
RenderFrameAction a = frame->render(frame->context);
|
||||
assert(evloop.stack_ptr == stack_prev);
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ static bool laserdraw_add(Laser *l) {
|
|||
static void laserdraw_pass1_render(void) {
|
||||
r_state_push();
|
||||
r_framebuffer(ldraw.fb.sdf);
|
||||
r_clear(CLEAR_COLOR, RGBA(LASER_SDF_RANGE, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(LASER_SDF_RANGE, 0, 0, 0), 1);
|
||||
r_blend(BLENDMODE_COMPOSE(
|
||||
BLENDFACTOR_SRC_COLOR, BLENDFACTOR_DST_COLOR, BLENDOP_MIN,
|
||||
BLENDFACTOR_SRC_ALPHA, BLENDFACTOR_DST_ALPHA, BLENDOP_MIN
|
||||
|
|
|
@ -123,7 +123,7 @@ void marisa_common_masterspark_draw(int numBeams, MarisaBeamInfo *beamInfos, flo
|
|||
FBPair *aux = stage_get_fbpair(FBPAIR_FG_AUX);
|
||||
|
||||
r_framebuffer(aux->back);
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
for(int i = 0; i < numBeams; i++) {
|
||||
draw_masterspark_beam(beamInfos[i].origin, beamInfos[i].size, beamInfos[i].angle, beamInfos[i].t, alpha);
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ void marisa_common_masterspark_draw(int numBeams, MarisaBeamInfo *beamInfos, flo
|
|||
FBPair *aux = stage_get_fbpair(FBPAIR_FG_AUX);
|
||||
|
||||
r_framebuffer(aux->back);
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
|
||||
for(int i = 0; i < numBeams; i++) {
|
||||
draw_masterspark_beam(beamInfos[i].origin, beamInfos[i].size, beamInfos[i].angle, beamInfos[i].t, alpha);
|
||||
|
@ -159,7 +159,7 @@ void marisa_common_masterspark_draw(int numBeams, MarisaBeamInfo *beamInfos, flo
|
|||
|
||||
fbpair_swap(aux);
|
||||
r_framebuffer(aux->back);
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
draw_framebuffer_tex(aux->front, VIEWPORT_W, VIEWPORT_H);
|
||||
|
||||
r_uniform_vec2("blur_direction", 0, blur);
|
||||
|
|
|
@ -211,7 +211,7 @@ static void marisa_laser_draw_lasers(EntityInterface *ent) {
|
|||
r_uniform_float(u_clr_phase, -1.5 * t/M_PI);
|
||||
r_uniform_float(u_clr_freq, 10.0);
|
||||
r_framebuffer(fbp_aux->back);
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_color4(1, 1, 1, 1);
|
||||
|
||||
r_blend(r_blend_compose(
|
||||
|
@ -231,7 +231,7 @@ static void marisa_laser_draw_lasers(EntityInterface *ent) {
|
|||
stage_draw_begin_noshake();
|
||||
|
||||
r_framebuffer(fbp_aux->back);
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_shader("max_to_alpha");
|
||||
draw_framebuffer_tex(fbp_aux->front, VIEWPORT_W, VIEWPORT_H);
|
||||
fbpair_swap(fbp_aux);
|
||||
|
|
|
@ -270,7 +270,7 @@ static void reimu_dream_draw_gaps(EntityInterface *gap_renderer_ent) {
|
|||
r_shader("reimu_gap");
|
||||
r_uniform_int("draw_background", true);
|
||||
r_blend(BLEND_NONE);
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
} else {
|
||||
r_shader("reimu_gap");
|
||||
r_uniform_int("draw_background", false);
|
||||
|
|
|
@ -80,7 +80,7 @@ void portrait_render(Sprite *s_base, Sprite *s_face, Sprite *s_out) {
|
|||
r_framebuffer_attach(fb, ptex, 0, FRAMEBUFFER_ATTACH_COLOR0);
|
||||
r_framebuffer_viewport(fb, 0, 0, tex_w, tex_h);
|
||||
r_framebuffer(fb);
|
||||
r_framebuffer_clear(fb, CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_framebuffer_clear(fb, BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
|
||||
r_mat_proj_push_ortho(spr_w - s_base->padding.w, spr_h - s_base->padding.h);
|
||||
r_mat_mv_push_identity();
|
||||
|
|
|
@ -70,7 +70,7 @@ void r_post_init(void) {
|
|||
r_depth_func(DEPTH_LEQUAL);
|
||||
r_cull(CULL_BACK);
|
||||
r_blend(BLEND_PREMUL_ALPHA);
|
||||
r_framebuffer_clear(NULL, CLEAR_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
r_framebuffer_clear(NULL, BUFFER_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
|
||||
log_info("Rendering subsystem initialized (%s)", _r_backend.name);
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ void r_framebuffer_get_output_attachments(Framebuffer *fb, FramebufferAttachment
|
|||
B.framebuffer_outputs(fb, config, 0x00);
|
||||
}
|
||||
|
||||
void r_framebuffer_clear(Framebuffer *fb, ClearBufferFlags flags, const Color *colorval, float depthval) {
|
||||
void r_framebuffer_clear(Framebuffer *fb, BufferKindFlags flags, const Color *colorval, float depthval) {
|
||||
B.framebuffer_clear(fb, flags, colorval, depthval);
|
||||
}
|
||||
|
||||
|
|
|
@ -296,12 +296,19 @@ typedef struct UniformTypeInfo {
|
|||
|
||||
typedef struct Uniform Uniform;
|
||||
|
||||
typedef enum ClearBufferFlags {
|
||||
CLEAR_COLOR = (1 << 0),
|
||||
CLEAR_DEPTH = (1 << 1),
|
||||
typedef enum BufferKindFlags {
|
||||
BUFFER_COLOR = (1 << 0),
|
||||
BUFFER_DEPTH = (1 << 1),
|
||||
|
||||
CLEAR_ALL = CLEAR_COLOR | CLEAR_DEPTH,
|
||||
} ClearBufferFlags;
|
||||
BUFFER_ALL = BUFFER_COLOR | BUFFER_DEPTH,
|
||||
|
||||
CLEAR_COLOR attr_deprecated("Use BUFFER_COLOR instead") = BUFFER_COLOR,
|
||||
CLEAR_DEPTH attr_deprecated("Use BUFFER_DEPTH instead") = BUFFER_DEPTH,
|
||||
CLEAR_ALL attr_deprecated("Use BUFFER_ALL instead") = BUFFER_ALL,
|
||||
} BufferKindFlags;
|
||||
|
||||
typedef BufferKindFlags ClearBufferFlags
|
||||
attr_deprecated("Use BufferKindFlags instead");
|
||||
|
||||
// Blend modes API based on the SDL one.
|
||||
|
||||
|
@ -761,7 +768,7 @@ void r_framebuffer_viewport(Framebuffer *fb, float x, float y, float w, float h)
|
|||
void r_framebuffer_viewport_rect(Framebuffer *fb, FloatRect viewport);
|
||||
void r_framebuffer_viewport_current(Framebuffer *fb, FloatRect *viewport) attr_nonnull(2);
|
||||
void r_framebuffer_destroy(Framebuffer *fb) attr_nonnull(1);
|
||||
void r_framebuffer_clear(Framebuffer *fb, ClearBufferFlags flags, const Color *colorval, float depthval);
|
||||
void r_framebuffer_clear(Framebuffer *fb, BufferKindFlags flags, const Color *colorval, float depthval);
|
||||
IntExtent r_framebuffer_get_size(Framebuffer *fb);
|
||||
|
||||
void r_framebuffer(Framebuffer *fb);
|
||||
|
@ -968,7 +975,7 @@ Uniform* r_shader_current_uniform(const char *name) {
|
|||
}
|
||||
|
||||
INLINE
|
||||
void r_clear(ClearBufferFlags flags, const Color *colorval, float depthval) {
|
||||
void r_clear(BufferKindFlags flags, const Color *colorval, float depthval) {
|
||||
r_framebuffer_clear(r_framebuffer_current(), flags, colorval, depthval);
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ typedef struct RendererFuncs {
|
|||
void (*framebuffer_viewport_current)(Framebuffer *framebuffer, FloatRect *vp);
|
||||
FramebufferAttachmentQueryResult (*framebuffer_query_attachment)(Framebuffer *framebuffer, FramebufferAttachment attachment);
|
||||
void (*framebuffer_outputs)(Framebuffer *framebuffer, FramebufferAttachment config[FRAMEBUFFER_MAX_OUTPUTS], uint8_t write_mask);
|
||||
void (*framebuffer_clear)(Framebuffer *framebuffer, ClearBufferFlags flags, const Color *colorval, float depthval);
|
||||
void (*framebuffer_clear)(Framebuffer *framebuffer, BufferKindFlags flags, const Color *colorval, float depthval);
|
||||
IntExtent (*framebuffer_get_size)(Framebuffer *framebuffer);
|
||||
|
||||
void (*framebuffer)(Framebuffer *framebuffer);
|
||||
|
|
|
@ -162,17 +162,29 @@ const char *gl33_framebuffer_get_debug_label(Framebuffer* fb) {
|
|||
return fb->debug_label;
|
||||
}
|
||||
|
||||
void gl33_framebuffer_clear(Framebuffer *framebuffer, ClearBufferFlags flags, const Color *colorval, float depthval) {
|
||||
static GLuint buffer_flags_to_gl(BufferKindFlags flags) {
|
||||
GLuint glflags = 0;
|
||||
|
||||
if(flags & CLEAR_COLOR) {
|
||||
if(flags & BUFFER_COLOR) {
|
||||
glflags |= GL_COLOR_BUFFER_BIT;
|
||||
}
|
||||
|
||||
if(flags & BUFFER_DEPTH) {
|
||||
glflags |= GL_DEPTH_BUFFER_BIT;
|
||||
}
|
||||
|
||||
return glflags;
|
||||
}
|
||||
|
||||
void gl33_framebuffer_clear(Framebuffer *framebuffer, BufferKindFlags flags, const Color *colorval, float depthval) {
|
||||
GLuint glflags = buffer_flags_to_gl(flags);
|
||||
|
||||
if(flags & BUFFER_COLOR) {
|
||||
assert(colorval != NULL);
|
||||
gl33_set_clear_color(colorval);
|
||||
}
|
||||
|
||||
if(flags & CLEAR_DEPTH) {
|
||||
glflags |= GL_DEPTH_BUFFER_BIT;
|
||||
if(flags & BUFFER_DEPTH) {
|
||||
gl33_set_clear_depth(depthval);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ FramebufferAttachmentQueryResult gl33_framebuffer_query_attachment(Framebuffer *
|
|||
void gl33_framebuffer_outputs(Framebuffer *framebuffer, FramebufferAttachment config[FRAMEBUFFER_MAX_OUTPUTS], uint8_t write_mask);
|
||||
void gl33_framebuffer_destroy(Framebuffer *framebuffer);
|
||||
void gl33_framebuffer_taint(Framebuffer *framebuffer);
|
||||
void gl33_framebuffer_clear(Framebuffer *framebuffer, ClearBufferFlags flags, const Color *colorval, float depthval);
|
||||
void gl33_framebuffer_clear(Framebuffer *framebuffer, BufferKindFlags flags, const Color *colorval, float depthval);
|
||||
IntExtent gl33_framebuffer_get_effective_size(Framebuffer *framebuffer);
|
||||
void gl33_framebuffer_set_debug_label(Framebuffer *fb, const char *label);
|
||||
const char *gl33_framebuffer_get_debug_label(Framebuffer* fb);
|
||||
|
|
|
@ -537,7 +537,7 @@ void gl33_texture_clear(Texture *tex, const Color *clr) {
|
|||
// TODO: maybe find a more efficient method
|
||||
Framebuffer *temp_fb = r_framebuffer_create();
|
||||
r_framebuffer_attach(temp_fb, tex, 0, FRAMEBUFFER_ATTACH_COLOR0);
|
||||
r_framebuffer_clear(temp_fb, CLEAR_COLOR, clr, 1);
|
||||
r_framebuffer_clear(temp_fb, BUFFER_COLOR, clr, 1);
|
||||
r_framebuffer_destroy(temp_fb);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ static void null_framebuffer_viewport(Framebuffer *framebuffer, FloatRect vp) {
|
|||
static void null_framebuffer_viewport_current(Framebuffer *framebuffer, FloatRect *vp) { *vp = default_fb_viewport; }
|
||||
static void null_framebuffer(Framebuffer *framebuffer) { }
|
||||
static Framebuffer* null_framebuffer_current(void) { return (void*)&placeholder; }
|
||||
static void null_framebuffer_clear(Framebuffer *framebuffer, ClearBufferFlags flags, const Color *colorval, float depthval) { }
|
||||
static void null_framebuffer_clear(Framebuffer *framebuffer, BufferKindFlags flags, const Color *colorval, float depthval) { }
|
||||
static IntExtent null_framebuffer_get_size(Framebuffer *framebuffer) { return (IntExtent) { 64, 64 }; }
|
||||
|
||||
static int64_t null_vertex_buffer_stream_seek(SDL_RWops *rw, int64_t offset, int whence) { return 0; }
|
||||
|
|
|
@ -1244,7 +1244,7 @@ void text_render(const char *text, Font *font, Sprite *out_sprite, BBox *out_bbo
|
|||
r_state_push();
|
||||
|
||||
r_framebuffer(globals.render_buf);
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
|
||||
r_blend(BLEND_PREMUL_ALPHA);
|
||||
r_enable(RCAP_CULL_FACE);
|
||||
|
|
|
@ -813,7 +813,7 @@ static void stage_render_bg(StageInfo *stage) {
|
|||
FBPair *background = stage_get_fbpair(FBPAIR_BG);
|
||||
|
||||
r_framebuffer(background->back);
|
||||
r_clear(CLEAR_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
r_clear(BUFFER_ALL, RGBA(0, 0, 0, 1), 1);
|
||||
|
||||
if(should_draw_stage_bg()) {
|
||||
r_mat_mv_push();
|
||||
|
@ -836,7 +836,7 @@ static void stage_render_bg(StageInfo *stage) {
|
|||
Framebuffer *staging = stage_get_fbpair(FBPAIR_BG_AUX)->back;
|
||||
|
||||
r_state_push();
|
||||
r_framebuffer_clear(staging, CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_framebuffer_clear(staging, BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
draw_powersurge_effect(staging, BLEND_NONE);
|
||||
r_shader_standard();
|
||||
r_framebuffer(background->front);
|
||||
|
@ -1024,7 +1024,7 @@ void stage_draw_scene(StageInfo *stage) {
|
|||
|
||||
coevent_signal(&stagedraw.events.background_drawn);
|
||||
} else if(!key_nobg) {
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 1), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 1), 1);
|
||||
}
|
||||
|
||||
// draw the 2D objects
|
||||
|
|
|
@ -336,7 +336,7 @@ void stage1_draw(void) {
|
|||
if(ppq > 0) {
|
||||
r_state_push();
|
||||
r_framebuffer(stage1_draw_data->water_fbpair.back);
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
stage1_water_render_reflections();
|
||||
r_state_pop();
|
||||
fbpair_swap(&stage1_draw_data->water_fbpair);
|
||||
|
|
|
@ -163,7 +163,7 @@ void stage3_draw(void) {
|
|||
{ stage3_bg_leaves_draw, stage3_bg_pos },
|
||||
{ stage3_bg_ground_draw, stage3_bg_pos },
|
||||
};
|
||||
r_clear(CLEAR_COLOR, RGB(0.12, 0.11, 0.10), 1);
|
||||
r_clear(BUFFER_COLOR, RGB(0.12, 0.11, 0.10), 1);
|
||||
stage3d_draw(&stage_3d_context, 120, ARRAY_SIZE(segments), segments);
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ static bool stage4_water(Framebuffer *fb) {
|
|||
|
||||
// TODO: SSR-less version for postprocess < 2
|
||||
|
||||
r_clear(CLEAR_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_clear(BUFFER_COLOR, RGBA(0, 0, 0, 0), 1);
|
||||
r_mat_proj_push_perspective(stage_3d_context.cam.fovy, stage_3d_context.cam.aspect, stage_3d_context.cam.near, stage_3d_context.cam.far);
|
||||
r_state_push();
|
||||
r_mat_mv_push();
|
||||
|
|
|
@ -96,7 +96,7 @@ ManagedFramebuffer *fbmgr_framebuffer_create(const char *name, const Framebuffer
|
|||
}
|
||||
|
||||
r_framebuffer_viewport_rect(mfb->fb, fb_viewport);
|
||||
r_framebuffer_clear(mfb->fb, CLEAR_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_framebuffer_clear(mfb->fb, BUFFER_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
|
||||
list_push(&framebuffers, data);
|
||||
return mfb;
|
||||
|
|
|
@ -50,8 +50,8 @@ void fbpair_swap(FBPair *pair) {
|
|||
}
|
||||
|
||||
static void fbpair_clear(FBPair *pair) {
|
||||
r_framebuffer_clear(pair->front, CLEAR_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_framebuffer_clear(pair->back, CLEAR_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_framebuffer_clear(pair->front, BUFFER_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_framebuffer_clear(pair->back, BUFFER_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
}
|
||||
|
||||
void fbpair_resize(FBPair *pair, FramebufferAttachment attachment, uint width, uint height) {
|
||||
|
|
|
@ -891,7 +891,7 @@ void video_swap_buffers(void) {
|
|||
r_shader_standard();
|
||||
r_color3(1, 1, 1);
|
||||
draw_framebuffer_tex(pp_fb, SCREEN_W, SCREEN_H);
|
||||
r_framebuffer_clear(pp_fb, CLEAR_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_framebuffer_clear(pp_fb, BUFFER_ALL, RGBA(0, 0, 0, 0), 1);
|
||||
r_mat_proj_pop();
|
||||
r_state_pop();
|
||||
|
||||
|
|
Loading…
Reference in a new issue