summaryrefslogtreecommitdiff
path: root/examples/rects.c
blob: 5b12e40a034b219801e2fea0636a7416537caa22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <assert.h>

#include "../sponge.h"
#define SPONGE_EXAMPLE_IMPLEMENTATION
#include "../example.h"

void draw_frame(sponge_Texture c) {
    assert(c.width > 140 + 20);
    assert(c.height > 70 + 40);
    sponge_clear(c, sponge_color32_make(0xFF000000));
    sponge_draw_rect(c, sponge_vec2i_make(80, 70),  sponge_vec2i_make(80 + 20, 70 + 40),  sponge_color32_make(0xFFFF00FF));
    sponge_draw_rect(c, sponge_vec2i_make(140, 70), sponge_vec2i_make(140 + 20, 70 + 40), sponge_color32_make(0xFFFF00FF));
}