summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/blurfx.h
diff options
context:
space:
mode:
authoronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 00:43:33 +0000
committeronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 00:43:33 +0000
commit0ab00e046951ad9b6263c8fb0ede3effa86d222d (patch)
treeaf3675da1e41d63d136e72824326d2a0c358bb7b /beryl-plugins/src/blurfx.h
parent104ed8ebe6ebeed3e48c8b1269a23e36928aacc8 (diff)
downloadmarex-dev-0ab00e046951ad9b6263c8fb0ede3effa86d222d.tar.gz
marex-dev-0ab00e046951ad9b6263c8fb0ede3effa86d222d.tar.bz2
beryl-(core|plugins): moved matrix transformations out of gl (David Reveman)
- group not ported yet - blurfx has bugs but this will be fixed in a rewrite all other plugins should work git-svn-id: file:///beryl/trunk@4005 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/blurfx.h')
-rw-r--r--beryl-plugins/src/blurfx.h37
1 files changed, 14 insertions, 23 deletions
diff --git a/beryl-plugins/src/blurfx.h b/beryl-plugins/src/blurfx.h
index 5c4ac4c..e9fa401 100644
--- a/beryl-plugins/src/blurfx.h
+++ b/beryl-plugins/src/blurfx.h
@@ -156,8 +156,7 @@ static GLenum gl_error;
#define MODE_NORMAL 0
-#define MODE_OCCLUSION 1
-#define MODE_BLURREFLECTION 2
+#define MODE_BLURREFLECTION 1
static char *blurDisable[] = { "switcher" };
static char *mBlurModes[] = { N_("simple"), N_("accum"), N_("fbo") };
@@ -244,9 +243,6 @@ typedef struct _BlurfxScreen
Region blurredRegion; // already blurred region
- Region occlusion; // region to caclulate occlusion
- Bool od_active;
-
Bool was_transformed;
Bool paintingSwitcher;
@@ -263,8 +259,6 @@ typedef struct _BlurfxScreen
unsigned int noBlurWMask; // window types we disable blur
unsigned int noReflectionWMask; // window types we disable reflection
- float pm[16]; // here we store the projection matrix
-
int blur_shader;
// hardware support flags
@@ -288,7 +282,6 @@ typedef struct _BlurfxWindow
int lastY;
WindowPaintAttrib lastPAttrib;
- Region clip; // occluted region
Region paintRegion; // actual paint region
Region texDamage; // blur cache texture damage
Region damageRegion; // window damage
@@ -304,12 +297,11 @@ typedef struct _BlurfxWindow
Bool isSwitcher; // is this the switcher window
- float mvm[16]; // here we store the model view matrix
- Bool mvm_updated; // is the model view matrix up to date
-
int ipcs_disable_blur;
int ipcs_disable_reflection;
+ CompTransform mTransform;
+
}BlurfxWindow;
@@ -328,22 +320,21 @@ static Bool blurfxSetScreenOption (CompScreen *s, char *name, CompOptionValue *v
static CompOption* blurfxGetScreenOptions (CompScreen *s, int *count);
static void blurfxScreenInitOptions (BlurfxScreen *bs);
static void blurfxPreparePaintScreen (CompScreen *s, int ms);
-static Bool blurfxPaintScreen(CompScreen *s, const ScreenPaintAttrib *sa, Region region, int output, unsigned int mask);
+static Bool blurfxPaintScreen(CompScreen *s, const ScreenPaintAttrib *sa, const CompTransform *transform, Region region, int output, unsigned int mask);
static void blurfxPaintTransformedScreen(CompScreen *s, const ScreenPaintAttrib
-*sa, Region region, int output, unsigned int mask);
-static Bool blurfxDrawWindow (CompWindow *w, const WindowPaintAttrib *attrib,
+*sa, const CompTransform *transform, Region region, int output, unsigned int mask);
+static Bool blurfxDrawWindow (CompWindow *w, const CompTransform *transform, const FragmentAttrib *attrib,
Region region, unsigned int mask);
-static void blurfxDrawWindowTexture(CompWindow *w,CompTexture *texture, const WindowPaintAttrib *attrib, const FragmentAttrib *fAttrib, unsigned int mask);
+static void blurfxDrawWindowTexture(CompWindow *w,CompTexture *texture, const FragmentAttrib *fAttrib, unsigned int mask);
static void blurfxAddWindowGeometry (CompWindow *w, CompMatrix *m, int nM, Region region, Region clip);
static Bool blurfxDamageWindowRect (CompWindow *w, Bool initial, BoxPtr box);
-static void updateBlur(CompWindow *w, CompScreen *s, const WindowPaintAttrib *attrib, unsigned int mask, CompTextureFilter filter);
-static void updateBlurTexture(CompWindow *w, CompScreen *s, const WindowPaintAttrib *attrib, unsigned int mask, CompTextureFilter filter);
-static void updateBlurTextureSize(CompWindow *w, CompScreen *s, const WindowPaintAttrib *attrib, unsigned int mask);
-static void updateBlurNoFBO(CompWindow *w, CompScreen *s, const WindowPaintAttrib *attrib, unsigned int mask);
-static void updateBlurTextureNoFBO(CompWindow *w, CompScreen *s, const WindowPaintAttrib *attrib, unsigned int mask);
-static void drawBlur(CompWindow *w, CompScreen *s, CompTexture *texture, const WindowPaintAttrib *attrib, int mask, CompTextureFilter filter);
-static void drawReflection(CompWindow *w, CompScreen *s, CompTexture *texture, const WindowPaintAttrib *attrib, int mask, CompTextureFilter filter);
-static void drawBlur(CompWindow *w, CompScreen *s, CompTexture *texture, const WindowPaintAttrib *attrib, int mask, CompTextureFilter filter);
+static void updateBlur(CompWindow *w, CompScreen *s, unsigned int mask, CompTextureFilter filter);
+static void updateBlurTexture(CompWindow *w, CompScreen *s, unsigned int mask, CompTextureFilter filter);
+static void updateBlurTextureSize(CompWindow *w, CompScreen *s, unsigned int mask);
+static void updateBlurNoFBO(CompWindow *w, CompScreen *s, unsigned int mask);
+static void updateBlurTextureNoFBO(CompWindow *w, CompScreen *s, unsigned int mask);
+static void drawBlur(CompWindow *w, CompScreen *s, CompTexture *texture, const FragmentAttrib *attrib, int mask, CompTextureFilter filter);
+static void drawReflection(CompWindow *w, CompScreen *s, CompTexture *texture, const FragmentAttrib *attrib, int mask, CompTextureFilter filter);
static Bool blurfxToggleMotionBlur (CompDisplay *d, CompAction *ac, CompActionState state, CompOption *option, int nOption);
static Bool bindFbo(CompScreen *s, BlurTexture tex);
static void unbindFbo(CompScreen *s);