From 705ad3bee5de67725311d4085f0481fa7107ba41 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 11 Jan 2024 23:47:35 +0100 Subject: Render wallpaper --- src/pixmap_texture.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/pixmap_texture.h (limited to 'src/pixmap_texture.h') diff --git a/src/pixmap_texture.h b/src/pixmap_texture.h new file mode 100644 index 0000000..37f7ec4 --- /dev/null +++ b/src/pixmap_texture.h @@ -0,0 +1,28 @@ +#ifndef NGXC_PIXMAP_TEXTURE_H +#define NGXC_PIXMAP_TEXTURE_H + +#include + +#define GLX_GLXEXT_PROTOTYPES +#include +#include +#include + +typedef struct { + Display *display; + Pixmap pixmap; + GLXPixmap glx_pixmap; + GLuint texture_id; + int width; + int height; +} ngxc_pixmap_texture; + +bool ngxc_pixmap_texture_init(ngxc_pixmap_texture *self, Display *display, Pixmap pixmap); +void ngxc_pixmap_texture_deinit(ngxc_pixmap_texture *self); + +/* + This should ONLY be called when the pixmap is resized. +*/ +bool ngxc_pixmap_texture_on_resize(ngxc_pixmap_texture *self); + +#endif /* NGXC_PIXMAP_TEXTURE_H */ -- cgit v1.2.3