summaryrefslogtreecommitdiffstats
path: root/client/x11/pixels_source_p.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-06-21 14:17:29 +0200
committerAlexander Larsson <alexl@redhat.com>2010-06-21 14:50:18 +0200
commitcfc1e95bda0e150b3de225c3572bb1004dad070e (patch)
treee672e2607613ac012f0cfe3414a33b129bae52b2 /client/x11/pixels_source_p.h
parentae4436215cb113a02eac73c6afd368166090967c (diff)
downloadspice-cfc1e95bda0e150b3de225c3572bb1004dad070e.tar.gz
spice-cfc1e95bda0e150b3de225c3572bb1004dad070e.tar.xz
spice-cfc1e95bda0e150b3de225c3572bb1004dad070e.zip
Make opengl optional, disabled by default
The OpenGL renderer isn't really useful right now, its not quite up to date, its not really faster than software and it only supports a limited subset of drivers. So, lets disable it for now. Long term opengl rendering of the 2d part of spice is important if we want to combine 2d and 3d rendering (say if spice adds opengl support in the protocol). But until then this is isn't useful for normal use.
Diffstat (limited to 'client/x11/pixels_source_p.h')
-rw-r--r--client/x11/pixels_source_p.h26
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
};
};