From 6ecc3fc708a289dc2cac9d9b07e61808b79ceb6b Mon Sep 17 00:00:00 2001 From: IoIxD Date: Sun, 7 Dec 2025 20:43:24 -0700 Subject: [PATCH] remove some extranous gl stuff --- src/backend/wayland.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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) {