diff options
Diffstat (limited to 'src/graphics/vertex_buffer.c')
-rw-r--r-- | src/graphics/vertex_buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graphics/vertex_buffer.c b/src/graphics/vertex_buffer.c index 325665c..9d15d47 100644 --- a/src/graphics/vertex_buffer.c +++ b/src/graphics/vertex_buffer.c @@ -100,12 +100,12 @@ void mgl_vertex_buffer_draw(mgl_context *context, mgl_vertex_buffer *vertex_buff context->gl.glPushMatrix(); context->gl.glTranslatef(vertex_buffer->position.x, vertex_buffer->position.y, 0.0f); - context->gl.glBindTexture(GL_TEXTURE_2D, texture ? texture->id : 0); + mgl_texture_use(texture); context->gl.glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer->id); mgl_vertex_buffer_set_gl_buffer_pointers(context); context->gl.glDrawArrays(mgl_primitive_type_to_gl_mode(vertex_buffer->primitive_type), 0, vertex_buffer->vertex_count); context->gl.glBindBuffer(GL_ARRAY_BUFFER, 0); - context->gl.glBindTexture(GL_TEXTURE_2D, 0); + mgl_texture_use(NULL); context->gl.glPopMatrix(); } |