blob: 37f7ec478a7b13c4ac1e5d0d5c4b194b0aa19465 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 */
|