aboutsummaryrefslogtreecommitdiff
path: root/src/pixmap_texture.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-01-11 23:47:35 +0100
committerdec05eba <dec05eba@protonmail.com>2024-01-11 23:47:35 +0100
commit705ad3bee5de67725311d4085f0481fa7107ba41 (patch)
tree78879a96cdab04878072db18d51465560d95e094 /src/pixmap_texture.h
parentc4fb95cf0025b34ca14c22f4fbbfcef14d56d71c (diff)
Render wallpaper
Diffstat (limited to 'src/pixmap_texture.h')
-rw-r--r--src/pixmap_texture.h28
1 files changed, 28 insertions, 0 deletions
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 <stdbool.h>
+
+#define GLX_GLXEXT_PROTOTYPES
+#include <GL/glx.h>
+#include <GL/glxext.h>
+#include <X11/Xlib.h>
+
+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 */