diff options
Diffstat (limited to 'client/x11/pixels_source_p.h')
-rw-r--r-- | client/x11/pixels_source_p.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/client/x11/pixels_source_p.h b/client/x11/pixels_source_p.h index a3e4cfbc..b1b5261c 100644 --- a/client/x11/pixels_source_p.h +++ b/client/x11/pixels_source_p.h @@ -19,43 +19,54 @@ #define _H_PIXELE_SOURSR_P #include <X11/X.h> +#ifdef USE_OGL #include <GL/glu.h> +#endif // USE_OGL +#include <X11/Xdefs.h> +#include <X11/Xutil.h> // required by Xshm.h, but not included by it #include <X11/extensions/XShm.h> #include "red_window.h" +#ifdef USE_OGL #include "red_pixmap_gl.h" +#endif // USE_OGL #include "pixman_utils.h" enum { PIXELS_SOURCE_TYPE_INVALID, PIXELS_SOURCE_TYPE_X_DRAWABLE, PIXELS_SOURCE_TYPE_PIXMAP, +#ifdef USE_OGL PIXELS_SOURCE_TYPE_GL_TEXTURE, PIXELS_SOURCE_TYPE_GL_DRAWABLE, +#endif // USE_OGL }; struct PixelsSource_p { int type; union { struct { + XImage* x_image; + XShmSegmentInfo *shminfo; + pixman_image_t* pixman_image; + RedDrawable::Format format; + } pixmap; + + struct { Drawable drawable; int screen; GC gc; int width, height; +#ifdef USE_OGL RenderType rendertype; union { GLXPbuffer pbuff; GLuint fbo; }; RedGlContext context; +#endif // USE_OGL } x_drawable; - struct { - XImage* x_image; - XShmSegmentInfo *shminfo; - pixman_image_t* pixman_image; - RedDrawable::Format format; - } pixmap; - +#ifdef USE_OGL struct { RenderType rendertype; Win win; @@ -69,6 +80,7 @@ struct PixelsSource_p { }; RedGlContext context; } gl; +#endif // USE_OGL }; }; |