diff options
Diffstat (limited to 'src/main/engine/engine.c')
-rw-r--r-- | src/main/engine/engine.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/engine/engine.c b/src/main/engine/engine.c index 495b960..d9477cc 100644 --- a/src/main/engine/engine.c +++ b/src/main/engine/engine.c @@ -96,14 +96,21 @@ engine_calculate_fps() } static void +engine_set_background(Engine *engine) +{ + if (engine == NULL || engine->rendering_background == NULL) return; + Color *bk = engine->rendering_background; + glClearColor(bk->r, bk->g, bk->b, bk->a); +} + +static void draw_frames(void *data) { if (data == NULL) return; Engine *engine = data; - Color *bk = engine->rendering_background; - glClearColor(bk->r, bk->g, bk->b, bk->a); + engine_set_background(engine); glClear(GL_COLOR_BUFFER_BIT); glEnable(GL_LINE_SMOOTH); glEnable(GL_BLEND); |