summaryrefslogtreecommitdiff
path: root/gl.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-06 14:07:53 -0400
committerpommicket <pommicket@gmail.com>2023-08-06 14:07:53 -0400
commit52da64686fb506372fa09ab562915f895cd88cb9 (patch)
tree24c2ca40227ddc0ad92adced2432930d4beed729 /gl.c
parentb4e2b3d2407cbad54169da707f72595246e4794a (diff)
util cleanup
Diffstat (limited to 'gl.c')
-rw-r--r--gl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gl.c b/gl.c
index 64c3220..bf03250 100644
--- a/gl.c
+++ b/gl.c
@@ -234,10 +234,10 @@ void gl_geometry_rect(Rect r, u32 color_rgba) {
return;
vec4 color = rgba_u32_to_vec4(color_rgba);
- vec2 p1 = r.pos;
- vec2 p2 = vec2_add(r.pos, Vec2(0, r.size.y));
- vec2 p3 = vec2_add(r.pos, Vec2(r.size.x, r.size.y));
- vec2 p4 = vec2_add(r.pos, Vec2(r.size.x, 0));
+ vec2 p1 = {rect_x1(r), rect_y1(r)};
+ vec2 p2 = {rect_x1(r), rect_y2(r)};
+ vec2 p3 = {rect_x2(r), rect_y2(r)};
+ vec2 p4 = {rect_x2(r), rect_y1(r)};
GLSimpleTriangle triangle = {
{p1, color},