Skip to content

Commit 9fe8996

Browse files
committed
pass action fixes
1 parent 2dfe47e commit 9fe8996

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/system/sokol/main.c

+9-11
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <sokol_time.h>
3232
#include <sokol_audio.h>
3333
#include <sokol_glue.h>
34+
#include <util/sokol_color.h>
3435
#include <util/sokol_gl.h>
3536

3637
#if !defined(NDEBUG)
@@ -401,23 +402,13 @@ static void frame(void *userdata)
401402
sgl_matrix_mode_projection();
402403
sgl_ortho(0, sapp_widthf(), sapp_heightf(), 0, -1, +1);
403404

404-
sg_pass_action pass_action =
405-
{
406-
.colors[0] =
407-
{
408-
.load_action = SG_LOADACTION_CLEAR,
409-
.clear_value = 0xff0000ff,
410-
},
411-
};
412-
413405
if(studio_config(app->studio)->options.crt)
414406
{
415407
drawImage(viewport(), app->crt.image, app->linear);
416408

417409
// draw crt
418410
sg_begin_pass(&(sg_pass)
419411
{
420-
.action = pass_action,
421412
.attachments = app->crt.att,
422413
});
423414

@@ -432,7 +423,14 @@ static void frame(void *userdata)
432423
// draw screen
433424
sg_begin_pass(&(sg_pass)
434425
{
435-
.action = pass_action,
426+
.action =
427+
{
428+
.colors[0] =
429+
{
430+
.load_action = SG_LOADACTION_CLEAR,
431+
.clear_value = sg_make_color_1i(0xff0000ff),
432+
},
433+
},
436434
.swapchain = sglue_swapchain()
437435
});
438436

src/system/sokol/sokol.c

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <sokol_audio.h>
2929
#include <sokol_glue.h>
3030
#include <util/sokol_gl.h>
31+
#include <util/sokol_color.h>
3132

3233
#if !defined(NDEBUG)
3334
#include <sokol_log.h>

0 commit comments

Comments
 (0)