From 4951e8995e4fd63dd6461544cf2c66a6ad7d5cc5 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 09:31:33 +0900 Subject: [PATCH] remove egl dependency --- include/Mw/LowLevel/Wayland.h | 6 ------ src/backend/wayland.c | 18 +++--------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/include/Mw/LowLevel/Wayland.h b/include/Mw/LowLevel/Wayland.h index 394facf..cc334e0 100644 --- a/include/Mw/LowLevel/Wayland.h +++ b/include/Mw/LowLevel/Wayland.h @@ -12,10 +12,6 @@ #include #include -#include -#include -#include -#include #include #include @@ -115,8 +111,6 @@ struct _MwLLWaylandColor { struct _MwLLWaylandPixmap { struct _MwLLCommonPixmap common; - GLuint texture; - MwBool texture_deleted; }; #endif diff --git a/src/backend/wayland.c b/src/backend/wayland.c index 016456b..be24dbc 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -827,17 +827,8 @@ static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int wid r->common.width = width; r->common.height = height; - r->common.raw = data; - r->wayland.texture = 0; - - glGenTextures(1, &r->wayland.texture); - - glBindTexture(GL_TEXTURE_2D, r->wayland.texture); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glBindTexture(GL_TEXTURE_2D, 0); + r->common.raw = malloc(4 * width * height); + memcpy(r->common.raw, data, 4 * width * height); MwLLPixmapUpdate(r); @@ -845,13 +836,10 @@ static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int wid } static void MwLLPixmapUpdateImpl(MwLLPixmap r) { - glBindTexture(GL_TEXTURE_2D, r->wayland.texture); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, r->common.width, r->common.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, r->common.raw); - glBindTexture(GL_TEXTURE_2D, 0); + /* TODO */ } static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) { - glDeleteTextures(1, &pixmap->wayland.texture); free(pixmap); }