Re: [compiz] window walking interface

2007-06-21 Thread David Reveman
On Tue, 2007-06-12 at 21:16 +0200, Dennis Kasprzyk wrote:
> Am Dienstag 12 Juni 2007 19:27:41 schrieb Dennis Kasprzyk:
> > Am Dienstag 12 Juni 2007 14:52:53 schrieb Danny Baumann:
> > > Hi,
> > >
> > > > > Thanks for putting these changes in git, it indeed makes more sense
> > > > > than the way I did it first.
> > > > > I re-made the transparent cube patches to work now with this new
> > > > > interface. Tell me what you think about it.
> > >
> > > I re-did Roi's patches for latest cube plugin changes and coding style.
> > >
> > > Attached are the following:
> > > > 0001-cube-painting-order.txt:
> > > >
> > > > This is good to go in if you're able to help fix any regressions that
> > > > may appear. There's some coding style changes that need to be made
> > > > before I can let this go in, though.
> > > >
> > > > Please replace all C++ comments with C comments, keep declarations at
> > > > the beginning of each scope and make sure lines are no longer than 80
> > > > columns.
> > >
> > > This one is replaced by
> > > 0001-Improve-cube-paint-order-calculations.patch.
> > >
> > > > 0002-plugin-events.txt:
> > > >
> > > > This is not OK. Plugin events should not be used at all now that 3d and
> > > > rotate plugins can hook into the cube plugin directly. Just add
> > > > whatever hooks that are appropriate to the cube plugin.
> > >
> > > Replaced by 0002-Added-rotation-state.patch. With that patch, there is a
> > > rotation state variable in CubeScreen that is written by the plugin
> > > rotating it, rotate in the current case.
> > >
> > > > 0003-transparent-cube.txt:
> > > >
> > > > Looks OK. The same coding style changes need to be made here too,
> > > > though.
> > >
> > > Replaced by 0003-Add-cube-transparency.patch (which adds the cube
> > > transparency) and
> > > 0004-Added-option-to-enable-cube-transparency-only-on-but.patch (option
> > > to enable transparency only on 'manual' rotation).
> > >
> > > Are these patches ok to go in?
> > >
> > > Regards,
> > >
> > > Danny
> >
> > Hi,
> >
> > here are some additional transcube patches.
> >
> > 0005:
> > Fixes the FrontToBack calculation for inside cube mode.
> >
> > 0006:
> > Makes the checkFTB function wrapable to allow other plugins like cubereflex
> > to change the result of this function.
> >
> > 0007:
> > Separates paintTopBottom into individual functions and fixes normals and
> > painting order of the top and bottom caps.
> >
> > 0008:
> > Adds a wrapable paintInside function to allow other plugins to render
> > something inside of the transparent cube.
> >
> > Regards,
> > Dennis
> 
> This is an additional patch that compines the two orientation checking 
> function into one. It also disables the orientation checking functions for 
> the "inside" cube mode. In inside cube mode some points of the orientation 
> checking function get projected outside of the visible range and this 
> produces wrong results.

Sounds good. You know the related code better than me so feel free to
make adjustments as you like.

-David

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] window walking interface

2007-06-21 Thread David Reveman
On Tue, 2007-06-12 at 19:27 +0200, Dennis Kasprzyk wrote:
> Am Dienstag 12 Juni 2007 14:52:53 schrieb Danny Baumann:
> > Hi,
> >
> > > > Thanks for putting these changes in git, it indeed makes more sense
> > > > than the way I did it first.
> > > > I re-made the transparent cube patches to work now with this new
> > > > interface. Tell me what you think about it.
> >
> > I re-did Roi's patches for latest cube plugin changes and coding style.
> >
> > Attached are the following:
> > > 0001-cube-painting-order.txt:
> > >
> > > This is good to go in if you're able to help fix any regressions that
> > > may appear. There's some coding style changes that need to be made
> > > before I can let this go in, though.
> > >
> > > Please replace all C++ comments with C comments, keep declarations at
> > > the beginning of each scope and make sure lines are no longer than 80
> > > columns.
> >
> > This one is replaced by
> > 0001-Improve-cube-paint-order-calculations.patch.
> >
> > > 0002-plugin-events.txt:
> > >
> > > This is not OK. Plugin events should not be used at all now that 3d and
> > > rotate plugins can hook into the cube plugin directly. Just add whatever
> > > hooks that are appropriate to the cube plugin.
> >
> > Replaced by 0002-Added-rotation-state.patch. With that patch, there is a
> > rotation state variable in CubeScreen that is written by the plugin
> > rotating it, rotate in the current case.
> >
> > > 0003-transparent-cube.txt:
> > >
> > > Looks OK. The same coding style changes need to be made here too,
> > > though.
> >
> > Replaced by 0003-Add-cube-transparency.patch (which adds the cube
> > transparency) and
> > 0004-Added-option-to-enable-cube-transparency-only-on-but.patch (option
> > to enable transparency only on 'manual' rotation).
> >
> > Are these patches ok to go in?
> >
> > Regards,
> >
> > Danny
> 
> Hi,
> 
> here are some additional transcube patches.
> 
> 0005:
> Fixes the FrontToBack calculation for inside cube mode.
> 
> 0006:
> Makes the checkFTB function wrapable to allow other plugins like cubereflex 
> to 
> change the result of this function.

Yep, this is what I had mind for proper integration of the 3d plugin
functionality.

> 
> 0007:
> Separates paintTopBottom into individual functions and fixes normals and 
> painting order of the top and bottom caps.
> 
> 0008:
> Adds a wrapable paintInside function to allow other plugins to render 
> something inside of the transparent cube.
> 

All good. Please commit.

Thanks.

-David

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] window walking interface

2007-06-12 Thread Dennis Kasprzyk
Am Dienstag 12 Juni 2007 19:27:41 schrieb Dennis Kasprzyk:
> Am Dienstag 12 Juni 2007 14:52:53 schrieb Danny Baumann:
> > Hi,
> >
> > > > Thanks for putting these changes in git, it indeed makes more sense
> > > > than the way I did it first.
> > > > I re-made the transparent cube patches to work now with this new
> > > > interface. Tell me what you think about it.
> >
> > I re-did Roi's patches for latest cube plugin changes and coding style.
> >
> > Attached are the following:
> > > 0001-cube-painting-order.txt:
> > >
> > > This is good to go in if you're able to help fix any regressions that
> > > may appear. There's some coding style changes that need to be made
> > > before I can let this go in, though.
> > >
> > > Please replace all C++ comments with C comments, keep declarations at
> > > the beginning of each scope and make sure lines are no longer than 80
> > > columns.
> >
> > This one is replaced by
> > 0001-Improve-cube-paint-order-calculations.patch.
> >
> > > 0002-plugin-events.txt:
> > >
> > > This is not OK. Plugin events should not be used at all now that 3d and
> > > rotate plugins can hook into the cube plugin directly. Just add
> > > whatever hooks that are appropriate to the cube plugin.
> >
> > Replaced by 0002-Added-rotation-state.patch. With that patch, there is a
> > rotation state variable in CubeScreen that is written by the plugin
> > rotating it, rotate in the current case.
> >
> > > 0003-transparent-cube.txt:
> > >
> > > Looks OK. The same coding style changes need to be made here too,
> > > though.
> >
> > Replaced by 0003-Add-cube-transparency.patch (which adds the cube
> > transparency) and
> > 0004-Added-option-to-enable-cube-transparency-only-on-but.patch (option
> > to enable transparency only on 'manual' rotation).
> >
> > Are these patches ok to go in?
> >
> > Regards,
> >
> > Danny
>
> Hi,
>
> here are some additional transcube patches.
>
> 0005:
> Fixes the FrontToBack calculation for inside cube mode.
>
> 0006:
> Makes the checkFTB function wrapable to allow other plugins like cubereflex
> to change the result of this function.
>
> 0007:
> Separates paintTopBottom into individual functions and fixes normals and
> painting order of the top and bottom caps.
>
> 0008:
> Adds a wrapable paintInside function to allow other plugins to render
> something inside of the transparent cube.
>
> Regards,
> Dennis

This is an additional patch that compines the two orientation checking 
function into one. It also disables the orientation checking functions for 
the "inside" cube mode. In inside cube mode some points of the orientation 
checking function get projected outside of the visible range and this 
produces wrong results.

Dennis
>From dbca3cff69a75c1951e6629630ce420ef7f59e1d Mon Sep 17 00:00:00 2001
From: Dennis Kasprzyk <[EMAIL PROTECTED]>
Date: Tue, 12 Jun 2007 21:10:26 +0200
Subject: [PATCH] Combined checkFTB and capDirection into one checkOrientation function.

---
 include/cube.h |   18 +++--
 plugins/cube.c |  120 +--
 2 files changed, 43 insertions(+), 95 deletions(-)

diff --git a/include/cube.h b/include/cube.h
index 0a87626..293bad1 100644
--- a/include/cube.h
+++ b/include/cube.h
@@ -87,16 +87,11 @@ typedef void (*CubePaintInsideProc) (CompScreen			*s,
  CompOutput			*output,
  int			size);
 
-typedef Bool (*CubeCheckFTBProc) (CompScreen  *s,
-  const ScreenPaintAttrib *sAttrib,
-  const CompTransform *transform,
-  CompOutput  *output);
-
-typedef Bool (*CubeCapDirectionProc) (CompScreen  *s,
-  const ScreenPaintAttrib *sAttrib,
-  const CompTransform *transform,
-  CompOutput  *output,
-  float   y);
+typedef Bool (*CubeCheckOrientationProc) (CompScreen  *s,
+	  const ScreenPaintAttrib *sAttrib,
+	  const CompTransform *transform,
+	  CompOutput  *output,
+	  const float points[3][3]);
 
 typedef enum _PaintOrder
 {
@@ -128,8 +123,7 @@ typedef struct _CubeScreen {
 CubePaintTopProc  paintTop;
 CubePaintBottomProc   paintBottom;
 CubePaintInsideProc   paintInside;
-CubeCheckFTBProc  checkFTB;
-CubeCapDirectionProc  capDirection;
+CubeCheckOrientationProc  checkOrientation;
 
 CompOption opt[CUBE_SCREEN_OPTION_NUM];
 
diff --git a/plugins/cube.c b/plugins/cube.c
index dda6ea8..7d29ede 100644
--- a/plugins/cube.c
+++ b/plugins/cube.c
@@ -921,10 +921,11 @@ cubeDonePaintScreen (CompScreen *s)
 }
 
 static Bool
-cubeCheckFTB (CompScreen  *s,
-  const ScreenPaintAttrib *sAttrib,
-  const CompTransform *transform,
-  CompOutput  *outputPtr)
+cubeCheckOrientation (CompScreen  *s,
+	  const ScreenPaintAttrib *sAttrib,
+	  const CompTransform *transform,
+		  CompOutput  

Re: [compiz] window walking interface

2007-06-12 Thread Dennis Kasprzyk
Am Dienstag 12 Juni 2007 14:52:53 schrieb Danny Baumann:
> Hi,
>
> > > Thanks for putting these changes in git, it indeed makes more sense
> > > than the way I did it first.
> > > I re-made the transparent cube patches to work now with this new
> > > interface. Tell me what you think about it.
>
> I re-did Roi's patches for latest cube plugin changes and coding style.
>
> Attached are the following:
> > 0001-cube-painting-order.txt:
> >
> > This is good to go in if you're able to help fix any regressions that
> > may appear. There's some coding style changes that need to be made
> > before I can let this go in, though.
> >
> > Please replace all C++ comments with C comments, keep declarations at
> > the beginning of each scope and make sure lines are no longer than 80
> > columns.
>
> This one is replaced by
> 0001-Improve-cube-paint-order-calculations.patch.
>
> > 0002-plugin-events.txt:
> >
> > This is not OK. Plugin events should not be used at all now that 3d and
> > rotate plugins can hook into the cube plugin directly. Just add whatever
> > hooks that are appropriate to the cube plugin.
>
> Replaced by 0002-Added-rotation-state.patch. With that patch, there is a
> rotation state variable in CubeScreen that is written by the plugin
> rotating it, rotate in the current case.
>
> > 0003-transparent-cube.txt:
> >
> > Looks OK. The same coding style changes need to be made here too,
> > though.
>
> Replaced by 0003-Add-cube-transparency.patch (which adds the cube
> transparency) and
> 0004-Added-option-to-enable-cube-transparency-only-on-but.patch (option
> to enable transparency only on 'manual' rotation).
>
> Are these patches ok to go in?
>
> Regards,
>
> Danny

Hi,

here are some additional transcube patches.

0005:
Fixes the FrontToBack calculation for inside cube mode.

0006:
Makes the checkFTB function wrapable to allow other plugins like cubereflex to 
change the result of this function.

0007:
Separates paintTopBottom into individual functions and fixes normals and 
painting order of the top and bottom caps.

0008:
Adds a wrapable paintInside function to allow other plugins to render 
something inside of the transparent cube.

Regards,
Dennis

>From dbdda65693a002017eec3e058d45c9a56b2d2f90 Mon Sep 17 00:00:00 2001
From: Dennis Kasprzyk <[EMAIL PROTECTED]>
Date: Tue, 12 Jun 2007 17:59:28 +0200
Subject: [PATCH] Fixed FTB calculation for inside cube mode.

---
 plugins/cube.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/cube.c b/plugins/cube.c
index 5e5eab3..ae3bf31 100644
--- a/plugins/cube.c
+++ b/plugins/cube.c
@@ -973,7 +973,7 @@ cubeCheckFTB (CompScreen  *s,
 ortho[1] = vecA[2] * vecB[0] - vecA[0] * vecB[2];
 ortho[2] = vecA[0] * vecB[1] - vecA[1] * vecB[0];
 
-if (ortho[2] > 0.0f)
+if (ortho[2] > 0.0f && pntC[2] > DEFAULT_Z_CAMERA)
 {
 	/* The viewport is reversed, should be painted front to back. */
 	return TRUE;
-- 
1.5.0.5-dirty

>From 2c707d7bb1746ec7c856c2f7967a3e5f6000dd6b Mon Sep 17 00:00:00 2001
From: Dennis Kasprzyk <[EMAIL PROTECTED]>
Date: Tue, 12 Jun 2007 19:19:47 +0200
Subject: [PATCH] Added a wrapabble paintInside function to allow plugins to render something inside of the transparent cube.

---
 include/cube.h |7 +++
 plugins/cube.c |   20 
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/include/cube.h b/include/cube.h
index 74cb360..0a87626 100644
--- a/include/cube.h
+++ b/include/cube.h
@@ -81,6 +81,12 @@ typedef void (*CubePaintBottomProc) (CompScreen			*s,
  CompOutput			*output,
  int			size);
 
+typedef void (*CubePaintInsideProc) (CompScreen			*s,
+ const ScreenPaintAttrib 	*sAttrib,
+ const CompTransform	*transform,
+ CompOutput			*output,
+ int			size);
+
 typedef Bool (*CubeCheckFTBProc) (CompScreen  *s,
   const ScreenPaintAttrib *sAttrib,
   const CompTransform *transform,
@@ -121,6 +127,7 @@ typedef struct _CubeScreen {
 CubeClearTargetOutputProc clearTargetOutput;
 CubePaintTopProc  paintTop;
 CubePaintBottomProc   paintBottom;
+CubePaintInsideProc   paintInside;
 CubeCheckFTBProc  checkFTB;
 CubeCapDirectionProc  capDirection;
 
diff --git a/plugins/cube.c b/plugins/cube.c
index 5e3e8c5..dda6ea8 100644
--- a/plugins/cube.c
+++ b/plugins/cube.c
@@ -1367,6 +1367,13 @@ cubePaintBottom (CompScreen		 *s,
 }
 
 static void
+cubePaintInside (CompScreen		 *s,
+		 const ScreenPaintAttrib *sAttrib,
+		 const CompTransform	 *transform,
+		 CompOutput		 *output,
+		 int			 size) {}
+
+static void
 cubePaintTransformedOutput (CompScreen		*s,
 			const ScreenPaintAttrib *sAttrib,
 			const CompTransform	*transform,
@@ -1508,14 +1515,24 @@ cubePaintTransformedOutput (CompScreen		*s,
 	{
 	glNormal3f (0.0f, -1.0f, 0.0f);
 	if (cs->desktopOpacity != OPAQUE)
+	{
 		(*cs->paintBottom) (s, &sa, transform, outputP

Re: [compiz] window walking interface

2007-06-12 Thread Danny Baumann
Hi,

> > Thanks for putting these changes in git, it indeed makes more sense
> > than the way I did it first.
> > I re-made the transparent cube patches to work now with this new interface.
> > Tell me what you think about it.

I re-did Roi's patches for latest cube plugin changes and coding style.
Attached are the following:

> 0001-cube-painting-order.txt:
> 
> This is good to go in if you're able to help fix any regressions that
> may appear. There's some coding style changes that need to be made
> before I can let this go in, though.
> 
> Please replace all C++ comments with C comments, keep declarations at
> the beginning of each scope and make sure lines are no longer than 80
> columns.

This one is replaced by
0001-Improve-cube-paint-order-calculations.patch.

> 0002-plugin-events.txt:
> 
> This is not OK. Plugin events should not be used at all now that 3d and
> rotate plugins can hook into the cube plugin directly. Just add whatever
> hooks that are appropriate to the cube plugin.

Replaced by 0002-Added-rotation-state.patch. With that patch, there is a
rotation state variable in CubeScreen that is written by the plugin
rotating it, rotate in the current case.

> 0003-transparent-cube.txt:
> 
> Looks OK. The same coding style changes need to be made here too,
> though.

Replaced by 0003-Add-cube-transparency.patch (which adds the cube
transparency) and
0004-Added-option-to-enable-cube-transparency-only-on-but.patch (option
to enable transparency only on 'manual' rotation).

Are these patches ok to go in?

Regards,

Danny


0001-Improve-cube-paint-order-calculations.patch
Description: application/mbox


0002-Added-rotation-state.patch
Description: application/mbox


0003-Add-cube-transparency.patch
Description: application/mbox


0004-Added-option-to-enable-cube-transparency-only-on-but.patch
Description: application/mbox
___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] window walking interface

2007-06-05 Thread David Reveman
On Tue, 2007-06-05 at 16:01 +0300, Roi Cohen wrote:
> Hi,
> 
> Thanks for putting these changes in git, it indeed makes more sense
> than the way I did it first.
> I re-made the transparent cube patches to work now with this new interface.
> Tell me what you think about it.

0001-cube-painting-order.txt:

This is good to go in if you're able to help fix any regressions that
may appear. There's some coding style changes that need to be made
before I can let this go in, though.

Please replace all C++ comments with C comments, keep declarations at
the beginning of each scope and make sure lines are no longer than 80
columns.


0002-plugin-events.txt:

This is not OK. Plugin events should not be used at all now that 3d and
rotate plugins can hook into the cube plugin directly. Just add whatever
hooks that are appropriate to the cube plugin.


0003-transparent-cube.txt:

Looks OK. The same coding style changes need to be made here too,
though.

-David

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] window walking interface

2007-06-05 Thread Roi Cohen

Hi,

Thanks for putting these changes in git, it indeed makes more sense
than the way I did it first.
I re-made the transparent cube patches to work now with this new interface.
Tell me what you think about it.

-Roi

On 6/1/07, David Reveman <[EMAIL PROTECTED]> wrote:

I had a look at the interface that allows plugins to affect the stacking
of windows during rendering. Just adding first, next, prev, etc.
function pointers that can be wrapped didn't seem very appropriate as it
doesn't make sense to allow plugins to just wrap some of those functions
and the overhead from going through the whole wrapping chain every time
next or prev is called is unnecessary.

I've added a simple window walking interface that should be sufficient.
It should be easy to tell how it works from the changes to screen.c and
paint.c.

We still have to do something about the clip planes, right? I guess a
wrap-able setOutputClipPlanes function will do for now. I'll make this
change next unless you've got a better idea.

It should be fairly easy to properly integrate any 3D window elevation,
translucent cube and sticky window mode now that plugins can hook into
the cube plugins structures. Just add whatever hooks you need to the
cube plugin.

-David


From b1106c9cd92cf388f38d9a0f55a3cd3ac1b944c6 Mon Sep 17 00:00:00 2001
From: Roi Cohen <[EMAIL PROTECTED](none)>
Date: Tue, 5 Jun 2007 14:37:11 +0300
Subject: [PATCH] cube painting order

---
 include/cube.h |   20 ++-
 plugins/cube.c |  419 
 2 files changed, 284 insertions(+), 155 deletions(-)

diff --git a/include/cube.h b/include/cube.h
index f64ddc8..bc44a32 100644
--- a/include/cube.h
+++ b/include/cube.h
@@ -25,7 +25,7 @@
 
 #include 
 
-#define CUBE_ABIVERSION 20070523
+#define CUBE_ABIVERSION 20070604
 
 #define CUBE_DISPLAY_OPTION_ABI0
 #define CUBE_DISPLAY_OPTION_INDEX  1
@@ -71,6 +71,12 @@ typedef void (*CubePaintTopBottomProc) (CompScreen   
*s,
CompOutput  *output,
int size);
 
+typedef enum _PaintOrder
+{
+BTF = 0,
+FTB
+} PaintOrder;
+
 typedef struct _CubeScreen {
 PreparePaintScreenProc preparePaintScreen;
 DonePaintScreenProc   donePaintScreen;
@@ -80,6 +86,7 @@ typedef struct _CubeScreen {
 ApplyScreenTransformProc   applyScreenTransform;
 SetScreenOptionProc   setScreenOption;
 OutputChangeNotifyProc outputChangeNotify;
+InitWindowWalkerProc   initWindowWalker;
 
 CubeGetRotationProc  getRotation;
 CubeClearTargetOutputProc clearTargetOutput;
@@ -87,11 +94,12 @@ typedef struct _CubeScreen {
 
 CompOption opt[CUBE_SCREEN_OPTION_NUM];
 
-int  invert;
-int  xrotations;
-GLfloat  distance;
-GLushort color[3];
-GLfloat  tc[12];
+intinvert;
+intxrotations;
+PaintOrder paintOrder;
+GLfloatdistance;
+GLushort   color[3];
+GLfloattc[12];
 
 int grabIndex;
 
diff --git a/plugins/cube.c b/plugins/cube.c
index df857ad..f28b9f5 100644
--- a/plugins/cube.c
+++ b/plugins/cube.c
@@ -32,6 +32,37 @@
 
 #include 
 
+#define MULTM(x, y, z) \
+z[0] = x[0] * y[0] + x[4] * y[1] + x[8] * y[2] + x[12] * y[3]; \
+z[1] = x[1] * y[0] + x[5] * y[1] + x[9] * y[2] + x[13] * y[3]; \
+z[2] = x[2] * y[0] + x[6] * y[1] + x[10] * y[2] + x[14] * y[3]; \
+z[3] = x[3] * y[0] + x[7] * y[1] + x[11] * y[2] + x[15] * y[3]; \
+z[4] = x[0] * y[4] + x[4] * y[5] + x[8] * y[6] + x[12] * y[7]; \
+z[5] = x[1] * y[4] + x[5] * y[5] + x[9] * y[6] + x[13] * y[7]; \
+z[6] = x[2] * y[4] + x[6] * y[5] + x[10] * y[6] + x[14] * y[7]; \
+z[7] = x[3] * y[4] + x[7] * y[5] + x[11] * y[6] + x[15] * y[7]; \
+z[8] = x[0] * y[8] + x[4] * y[9] + x[8] * y[10] + x[12] * y[11]; \
+z[9] = x[1] * y[8] + x[5] * y[9] + x[9] * y[10] + x[13] * y[11]; \
+z[10] = x[2] * y[8] + x[6] * y[9] + x[10] * y[10] + x[14] * y[11]; \
+z[11] = x[3] * y[8] + x[7] * y[9] + x[11] * y[10] + x[15] * y[11]; \
+z[12] = x[0] * y[12] + x[4] * y[13] + x[8] * y[14] + x[12] * y[15]; \
+z[13] = x[1] * y[12] + x[5] * y[13] + x[9] * y[14] + x[13] * y[15]; \
+z[14] = x[2] * y[12] + x[6] * y[13] + x[10] * y[14] + x[14] * y[15]; \
+z[15] = x[3] * y[12] + x[7] * y[13] + x[11] * y[14] + x[15] * y[15];
+
+#define MULTMV(m, v) { \
+float v0 = m[0]*v[0] + m[4]*v[1] + m[8]*v[2] + m[12]*v[3]; \
+float v1 = m[1]*v[0] + m[5]*v[1] + m[9]*v[2] + m[13]*v[3]; \
+float v2 = m[2]*v[0] + m[6]*v[1] + m[10]*v[2] + m[14]*v[3]; \
+float v3 = m[3]*v[0] + m[7]*v[1] + m[11]*v[2] + m[15]*v[3]; \
+v[0] = v0; v[1] = v1; v[2] = v2; v[3] = v3; }
+
+#define DIVV(v) \
+v[0] /= v[3]; \
+v[1] /= v[3]; \
+v[2] /= v[3]; \
+v[3] /= v[3];
+
 static CompMetadata cubeMetadata;
 
 static int cubeDisplayPrivateIndex;
@@ -812,6 +843,7 @@ cubePaintOutput (CompScreen  *s,
 }
 
 cs->srcOutput = (output->id != ~0) ? output->id : 0;
+cs->paintOrder = BT

[compiz] window walking interface

2007-06-01 Thread David Reveman
I had a look at the interface that allows plugins to affect the stacking
of windows during rendering. Just adding first, next, prev, etc.
function pointers that can be wrapped didn't seem very appropriate as it
doesn't make sense to allow plugins to just wrap some of those functions
and the overhead from going through the whole wrapping chain every time
next or prev is called is unnecessary.

I've added a simple window walking interface that should be sufficient.
It should be easy to tell how it works from the changes to screen.c and
paint.c.

We still have to do something about the clip planes, right? I guess a
wrap-able setOutputClipPlanes function will do for now. I'll make this
change next unless you've got a better idea.

It should be fairly easy to properly integrate any 3D window elevation,
translucent cube and sticky window mode now that plugins can hook into
the cube plugins structures. Just add whatever hooks you need to the
cube plugin.

-David

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz