diff --git a/src/backend/wayland.c b/src/backend/wayland.c index c8f2c90..6f34ab8 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -654,14 +654,14 @@ static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLL float maxX = 0, maxY = 0; float centerX, centerY; + glColor3f(color->common.red / 255.0, color->common.green / 255.0, color->common.blue / 255.0); + glBegin(GL_POLYGON); for(i = 0; i < points_count; i++) { float x = round(handle->wayland.x) + round(points[i].x); float y = round(handle->wayland.y) + round(points[i].y); - glColor3f(color->common.red / 255.0, color->common.green / 255.0, color->common.blue / 255.0); - glVertex2f(x, y); } glEnd(); @@ -672,7 +672,15 @@ static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { int i; glLineWidth(1); + glColor3f(color->common.red / 255.0, color->common.green / 255.0, color->common.blue / 255.0); + glBegin(GL_LINES); + for(i = 0; i < 2; i++) { + float x = round(handle->wayland.x) + round(points[i].x); + float y = round(handle->wayland.y) + round(points[i].y); + + glVertex2f(x, y); + } glEnd(); glColor3f(0, 0, 0); } @@ -807,7 +815,6 @@ static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) { glTexCoord2f(0.0f, 1); glVertex2f(x, y + rect->height); glEnd(); - glFinish(); } static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) {