aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/modules/engines/gl_x11/evas_engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/evas/src/modules/engines/gl_x11/evas_engine.h')
-rw-r--r--libraries/evas/src/modules/engines/gl_x11/evas_engine.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/libraries/evas/src/modules/engines/gl_x11/evas_engine.h b/libraries/evas/src/modules/engines/gl_x11/evas_engine.h
new file mode 100644
index 0000000..4f62c58
--- /dev/null
+++ b/libraries/evas/src/modules/engines/gl_x11/evas_engine.h
@@ -0,0 +1,126 @@
1#ifndef EVAS_ENGINE_H
2#define EVAS_ENGINE_H
3
4#include "config.h"
5#include "evas_common.h"
6#include "evas_private.h"
7#include "evas_gl_common.h"
8#include "Evas.h"
9#include "Evas_Engine_GL_X11.h"
10
11#define GL_GLEXT_PROTOTYPES
12
13#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
14# if defined(GLES_VARIETY_S3C6410)
15# include <EGL/egl.h>
16# include <GLES2/gl2.h>
17# include <X11/Xlib.h>
18# include <X11/Xatom.h>
19# include <X11/Xutil.h>
20# include <X11/extensions/Xrender.h>
21# include <X11/Xresource.h> // xres - dpi
22# elif defined(GLES_VARIETY_SGX)
23# define SUPPORT_X11 1
24# include <EGL/egl.h>
25# include <GLES2/gl2.h>
26# include <GLES2/gl2ext.h>
27# include <X11/Xlib.h>
28# include <X11/Xatom.h>
29# include <X11/Xutil.h>
30# include <X11/extensions/Xrender.h>
31# include <X11/Xresource.h> // xres - dpi
32# endif
33#else
34# include <X11/Xlib.h>
35# include <X11/Xatom.h>
36# include <X11/Xutil.h>
37# include <X11/extensions/Xrender.h>
38# include <X11/Xresource.h> // xres - dpi
39# include <GL/gl.h>
40# include <GL/glext.h>
41# include <GL/glx.h>
42#endif
43
44extern int _evas_engine_GL_X11_log_dom ;
45#ifdef ERR
46# undef ERR
47#endif
48#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
49
50#ifdef DBG
51# undef DBG
52#endif
53#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
54
55#ifdef INF
56# undef INF
57#endif
58#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
59
60#ifdef WRN
61# undef WRN
62#endif
63#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
64
65#ifdef CRIT
66# undef CRIT
67#endif
68#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_X11_log_dom, __VA_ARGS__)
69
70typedef struct _Evas_GL_X11_Window Evas_GL_X11_Window;
71
72struct _Evas_GL_X11_Window
73{
74 Display *disp;
75 Window win;
76 int w, h;
77 int screen;
78 XVisualInfo *visualinfo;
79 Visual *visual;
80 Colormap colormap;
81 int depth;
82 int alpha;
83 int rot;
84 Evas_Engine_GL_Context *gl_context;
85 struct {
86 int redraw : 1;
87 int drew : 1;
88 int x1, y1, x2, y2;
89 } draw;
90#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
91 EGLContext egl_context[1];
92 EGLSurface egl_surface[1];
93 EGLConfig egl_config;
94 EGLDisplay egl_disp;
95#else
96 GLXContext context;
97 GLXWindow glxwin;
98 struct {
99 GLXFBConfig fbc;
100 int tex_format;
101 int tex_target;
102 int mipmap;
103 unsigned char yinvert : 1;
104 } depth_cfg[33]; // config for all 32 possible depths!
105
106 struct {
107 unsigned int loose_binding : 1;
108 } detected;
109#endif
110 int surf : 1;
111};
112
113Evas_GL_X11_Window *eng_window_new(Display *disp, Window win, int screen,
114 Visual *vis, Colormap cmap,
115 int depth, int w, int h, int indirect,
116 int alpha, int rot);
117void eng_window_free(Evas_GL_X11_Window *gw);
118void eng_window_use(Evas_GL_X11_Window *gw);
119void eng_window_unsurf(Evas_GL_X11_Window *gw);
120void eng_window_resurf(Evas_GL_X11_Window *gw);
121
122Visual *eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo);
123Colormap eng_best_colormap_get(Evas_Engine_Info_GL_X11 *einfo);
124int eng_best_depth_get(Evas_Engine_Info_GL_X11 *einfo);
125
126#endif