diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-11-15 08:20:13 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-11-15 08:20:13 +0100 |
commit | a3c6774f211ee765f910df76837548bdadd4e959 (patch) | |
tree | 499b29166c04fa62cb946c7d395f8a5299c78fbf /src/graphics/vertex.c | |
parent | c4f84e1969f4c856a5bf0352e99fcb73a4cf56cf (diff) |
Add dynamic font atlas creation (not finished)
Diffstat (limited to 'src/graphics/vertex.c')
-rw-r--r-- | src/graphics/vertex.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/graphics/vertex.c b/src/graphics/vertex.c index dff9661..110c86d 100644 --- a/src/graphics/vertex.c +++ b/src/graphics/vertex.c @@ -5,6 +5,10 @@ void mgl_vertices_draw(mgl_context *context, const mgl_vertex *vertices, size_t if(vertex_count == 0) return; + context->gl.glMatrixMode(GL_TEXTURE); + context->gl.glLoadIdentity(); + context->gl.glMatrixMode(GL_MODELVIEW); + context->gl.glVertexPointer(2, GL_FLOAT, sizeof(mgl_vertex), (void*)&vertices[0].position); context->gl.glTexCoordPointer(2, GL_FLOAT, sizeof(mgl_vertex), (void*)&vertices[0].texcoords); context->gl.glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(mgl_vertex), (void*)&vertices[0].color); |