add support for render to pixmap
authorDerek Foreman <manmower@gmail.com>
Wed, 18 Jun 2003 04:35:27 +0000 (04:35 +0000)
committerDerek Foreman <manmower@gmail.com>
Wed, 18 Jun 2003 04:35:27 +0000 (04:35 +0000)
render2/instance.h
render2/surface.h

index de994576c8cd3d55b749a012c5de8df5ed267117..9f0e0d56e5e1acf4fc46819feed2be7e303dfec9 100644 (file)
@@ -28,6 +28,8 @@ struct RrInstance {
     int green_shift;
     int blue_shift;
 
+    gboolean render_to_pixmap;
+
     GHashTable *surface_map;
 };
 
@@ -39,9 +41,12 @@ struct RrInstance {
                                                           (i)->screen)))
 #define RrDepth(i)    ((i)->visinfo.depth)
 #define RrVisual(i)   ((i)->visinfo.visual)
+#define RrVisualInfo(i) (&(i)->visinfo)
 #define RrColormap(i) ((i)->cmap)
 #define RrContext(i)  ((i)->glx_context)
 
+#define RrRenderToPixmap(i) ((i)->render_to_pixmap)
+
 #define RrShapeWindow(i) ((i)->shape_window)
 
 struct RrSurface;
index 39dbffc2d3731f9e3b2c9d22f10329c6cd1bc1eb..a568fc37f212d084f338b3fc0233714af968863d 100644 (file)
@@ -5,6 +5,7 @@
 #include "texture.h"
 #include "planar.h"
 #include <glib.h>
+#include <GL/glx.h>
 
 struct RrNonPlanarSurface {
     int foo;
@@ -44,6 +45,8 @@ struct RrSurface {
     int h;
 
     int visible : 1;
+    Pixmap pixmap;
+    GLXPixmap glxpixmap;
 
     GSList *children;
 };
@@ -59,7 +62,8 @@ struct RrTexture *RrSurfaceTexture(struct RrSurface *sur, int texnum);
 #define RrSurfaceY(sur) ((sur)->y)
 #define RrSurfaceWidth(sur) ((sur)->w)
 #define RrSurfaceHeight(sur) ((sur)->h)
-
+#define RrSurfacePixmap(sur) ((sur)->pixmap)
+#define RrSurfaceGLXPixmap(sur) ((sur)->glxpixmap)
 #define RrSurfaceChildren(sur) ((sur)->children)
 
 #endif