diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-12-08 01:02:56 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-12-08 01:03:15 +0100 |
commit | b7e3507a82d93b470d89f5cdf838f480bd7e4ab4 (patch) | |
tree | ac689868c0b0e6caa8a13038e2dd7f9b02e2ef50 /include | |
parent | 1739930d6f4b16eb5f3118412cddd20277ac5639 (diff) |
Vertex translation, fix vertex texture use
Diffstat (limited to 'include')
-rw-r--r-- | include/mgl/graphics/vertex.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/mgl/graphics/vertex.h b/include/mgl/graphics/vertex.h index 8cc2f25..2980f83 100644 --- a/include/mgl/graphics/vertex.h +++ b/include/mgl/graphics/vertex.h @@ -7,17 +7,18 @@ #include <stddef.h> typedef struct mgl_context mgl_context; +typedef struct mgl_vertex mgl_vertex; -typedef struct { +struct mgl_vertex { mgl_vec2f position; mgl_vec2f texcoords; mgl_color color; -} mgl_vertex; +}; /* Note: this sends the vertices to the gpu everytime this is called. This should only be used for small lists of vertices or if every vertex needs to change every frame. Use mgl_vertex_buffer instead if possible. */ -void mgl_vertices_draw(mgl_context *context, const mgl_vertex *vertices, size_t vertex_count, mgl_primitive_type primitive_type); +void mgl_vertices_draw(mgl_context *context, const mgl_vertex *vertices, size_t vertex_count, mgl_primitive_type primitive_type, mgl_vec2f position); #endif /* MGL_VERTEX_H */ |