diff options
-rw-r--r-- | include/mgl/graphics/rectangle.h | 2 | ||||
-rw-r--r-- | src/graphics/rectangle.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/mgl/graphics/rectangle.h b/include/mgl/graphics/rectangle.h index c48d108..c18d818 100644 --- a/include/mgl/graphics/rectangle.h +++ b/include/mgl/graphics/rectangle.h @@ -12,6 +12,6 @@ typedef struct { mgl_color color; } mgl_rectangle; -void mgl_rectangle_draw(mgl_context *context, mgl_rectangle *rect); +void mgl_rectangle_draw(mgl_context *context, const mgl_rectangle *rect); #endif /* MGL_RECTANGLE_H */ diff --git a/src/graphics/rectangle.c b/src/graphics/rectangle.c index c6b2126..879e0dd 100644 --- a/src/graphics/rectangle.c +++ b/src/graphics/rectangle.c @@ -1,7 +1,7 @@ #include "../../include/mgl/graphics/rectangle.h" #include "../../include/mgl/mgl.h" -void mgl_rectangle_draw(mgl_context *context, mgl_rectangle *rect) { +void mgl_rectangle_draw(mgl_context *context, const mgl_rectangle *rect) { context->gl.glColor4ub(rect->color.r, rect->color.g, rect->color.b, rect->color.a); context->gl.glBegin(GL_QUADS); context->gl.glVertex3f(rect->position.x, rect->position.y, 0.0f); |