From c04562a24e7fbee0839d00a8bfd5253426a98f20 Mon Sep 17 00:00:00 2001 From: pommicket Date: Mon, 2 Jan 2023 14:52:26 -0500 Subject: rename v[234] to vec[234] --- gl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gl.c') diff --git a/gl.c b/gl.c index 57b716c..e2cfc21 100644 --- a/gl.c +++ b/gl.c @@ -186,11 +186,11 @@ GLint gl_uniform_location(GLuint program, const char *uniform) { } typedef struct { - v2 pos; - v4 color; + vec2 pos; + vec4 color; } GLSimpleVertex; typedef struct { - GLSimpleVertex v1, v2, v3; + GLSimpleVertex vert1, vert2, vert3; } GLSimpleTriangle; static GLSimpleTriangle *gl_geometry_triangles; @@ -228,12 +228,12 @@ void gl_geometry_init(void) { } void gl_geometry_rect(Rect r, u32 color_rgba) { - v4 color = rgba_u32_to_v4(color_rgba); + vec4 color = rgba_u32_to_vec4(color_rgba); - v2 p1 = r.pos; - v2 p2 = v2_add(r.pos, V2(0, r.size.y)); - v2 p3 = v2_add(r.pos, V2(r.size.x, r.size.y)); - v2 p4 = v2_add(r.pos, V2(r.size.x, 0)); + 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)); GLSimpleTriangle triangle = { {p1, color}, @@ -241,9 +241,9 @@ void gl_geometry_rect(Rect r, u32 color_rgba) { {p3, color} }; arr_add(gl_geometry_triangles, triangle); - triangle.v1.pos = p3; - triangle.v2.pos = p4; - triangle.v3.pos = p1; + triangle.vert1.pos = p3; + triangle.vert2.pos = p4; + triangle.vert3.pos = p1; arr_add(gl_geometry_triangles, triangle); } -- cgit v1.2.3