remove egl dependency
This commit is contained in:
parent
f68b9a9aae
commit
4951e8995e
2 changed files with 3 additions and 21 deletions
|
|
@ -12,10 +12,6 @@
|
|||
#include <Mw/LowLevel.h>
|
||||
|
||||
#include <wayland-client-protocol.h>
|
||||
#include <wayland-egl.h>
|
||||
#include <EGL/egl.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
|
@ -115,8 +111,6 @@ struct _MwLLWaylandColor {
|
|||
|
||||
struct _MwLLWaylandPixmap {
|
||||
struct _MwLLCommonPixmap common;
|
||||
GLuint texture;
|
||||
MwBool texture_deleted;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue