View Full Version : Christmas Plugin
nzjrs
December 5th, 2006, 04:12 AM
I dont follow the beryl forums anymore so I dont know how well known this is
http://cornergraf.net/projects/xglsnow/
Looks pretty though
mikedee
December 5th, 2006, 03:39 PM
I have a feeling that because they do not have David to assist with this one that they have gone off hacking without really knowing. The original plugin is trying to paint to only the desktop window but they couldn't see how to do it so they added a few hacks to the core, the original is also very very slow. I have converted it and speeded it up so that it runs without slowdowns. I made it snow over the top of the screen to avoid all of the slow window repaints (which do not seem necessary to me).
My problem is that I cannot see the snow if I move the png file to ~/.compiz/plugins/ - if I hide the file then I get square snow. Not sure if this is just me, a few people on the beryl forums reported that they have the same problem.
http://www.anykeysoftware.co.uk/compiz/plugins/snow.tar.gz
LOAD BEFORE CUBE!!
corner
December 6th, 2006, 07:56 PM
I know very little about beryl/compiz plugin architecture so it might be somewhat hackish from your perspective. I have been unable to get your changed version running here with a quick try (it compiles but doesn't show up in settings manager), is the new version drawing snow above all windows, that is in front of them?
The behavior I'm seeking is to properly draw behind all windows, but obviously above the Desktop.
If you can help me out on doing this better than it works now I would appreciate it very much. One thing I really have no clue about is the mask system, could you explain to me how exactly it affects the drawing process, and how the drawing process in general works?
mikedee
December 6th, 2006, 08:10 PM
Hey, I am not the expert either, the main thing I saw which got me thinking that the plugin wasnt doing things the correct way was all of the window damages that were happening. They were responsible for the major slowness of the drawing so I removed them.
I changed it for compiz to render on top of all the windows because I noticed that the top-to-bottom patches were added to beryl to allow you to draw correctly. I have seen this type of patch before in animation and others which wasnt necessary. After asking David on the mailing lists we discovered that their thinking was wrong and that what they wanted was possible another way.
It is not your fault at all, and I am afraid that I do not know the answers myself. You really should ask on the compiz mailing list and see if you can get a reply from David, he has been friendly and helpful in getting 3rd party plugins running before (particularly animation). David wrote the entire framework and he is an OpenGL and X expert so he will know. He isnt always the fastest to respond, but you will get a very good answer.
The mailing list is here
http://lists.freedesktop.org/mailman/listinfo/compiz
Also as a side note you may be interested in point 8 from Davids roadmap.
http://lists.freedesktop.org/archives/compiz/2006-November/000870.html
mikedee
December 7th, 2006, 04:00 PM
Just a quick point on your frame limiting question.
I think you are approaching the animation from a slightly different perspective. I think this is the correct strategy for animating on the screen.
First work out how long the snowflake should take to travel the distance of the screen.
Before painting to the screen work out how far the snowflake should have moved since the last paint based on how long since the last paint.
Then on paint you can put the snowflake in at the correct place.
Just to clarify.. Painting your snowflakes to the screen on each paint shouldnt cause the slowdowns. The slowdown is caused (I think) by looping through each window and only damaging the desktop window in the donePaintScreen function.
mikedee
December 13th, 2006, 08:11 PM
Just a quick note to say I have re-ported the new version of this and it is running much better now. I still had to change PAINT_SCREEN_ORDER_BACK_TO_FRONT_MASK to PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK as per Davids post here.
As far as I know this works exactly the same as in beryl.
http://lists.freedesktop.org/archives/compiz/2006-December/000989.html
The plugin is here
http://www.anykeysoftware.co.uk/compiz/plugins/snow.tar.gz
zachtib
December 17th, 2006, 10:52 PM
is there a way to get the newest version of this plugin (0.2.0) working on compiz? It works fine for me under beryl, but compiz is much faster and stabler for me.
I usually leave xsnow on around this time of year, but after playing with this plugin, xsnow seems so... old.
mikedee
December 18th, 2006, 02:08 AM
If you download again I have reupdated to the latest version recently, it seems to work well for most people.
See this thread if you have any problems
http://forum.go-compiz.org/viewtopic.php?t=234
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.