]> Git Repo - qemu.git/blame - include/ui/egl-helpers.h
tests/tco: Make test independent of global_qtest
[qemu.git] / include / ui / egl-helpers.h
CommitLineData
7ced9e9f
GH
1#ifndef EGL_HELPERS_H
2#define EGL_HELPERS_H
3
4#include <epoxy/gl.h>
5#include <epoxy/egl.h>
1e316598 6#include <gbm.h>
7ced9e9f
GH
7
8extern EGLDisplay *qemu_egl_display;
9extern EGLConfig qemu_egl_config;
54d208ff 10extern DisplayGLMode qemu_egl_mode;
7ced9e9f 11
6fafc260
GH
12typedef struct egl_fb {
13 int width;
14 int height;
15 GLuint texture;
16 GLuint framebuffer;
17 bool delete_texture;
18} egl_fb;
19
20void egl_fb_destroy(egl_fb *fb);
21void egl_fb_setup_default(egl_fb *fb, int width, int height);
74083f9c
GH
22void egl_fb_setup_for_tex(egl_fb *fb, int width, int height,
23 GLuint texture, bool delete);
24void egl_fb_setup_new_tex(egl_fb *fb, int width, int height);
6fafc260
GH
25void egl_fb_blit(egl_fb *dst, egl_fb *src, bool flip);
26void egl_fb_read(void *dst, egl_fb *src);
27
0eb50c27
GH
28void egl_texture_blit(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip);
29void egl_texture_blend(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip,
051a0cde 30 int x, int y, double scale_x, double scale_y);
0eb50c27 31
1e316598
GH
32#ifdef CONFIG_OPENGL_DMABUF
33
34extern int qemu_egl_rn_fd;
35extern struct gbm_device *qemu_egl_rn_gbm_dev;
36extern EGLContext qemu_egl_rn_ctx;
37
54d208ff 38int egl_rendernode_init(const char *rendernode, DisplayGLMode mode);
1e316598
GH
39int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc);
40
86c0522c
GH
41void egl_dmabuf_import_texture(QemuDmaBuf *dmabuf);
42void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf);
43
1e316598
GH
44#endif
45
fbd57c75 46EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win);
7ced9e9f 47
54d208ff
GH
48int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy, DisplayGLMode mode);
49int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode);
7ced9e9f 50EGLContext qemu_egl_init_ctx(void);
7ced9e9f
GH
51
52#endif /* EGL_HELPERS_H */
This page took 0.18691 seconds and 4 git commands to generate.