<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Kommentare zu: How to write a KWin effect</title>
	<atom:link href="http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/</link>
	<description>From the land of wobbly windows</description>
	<lastBuildDate>Tue, 07 Feb 2012 07:32:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>Von: Hans Chen (mogger) 's status on Monday, 13-Jul-09 09:50:21 UTC - Identi.ca</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-4324</link>
		<dc:creator>Hans Chen (mogger) 's status on Monday, 13-Jul-09 09:50:21 UTC - Identi.ca</dc:creator>
		<pubDate>Mon, 13 Jul 2009 09:50:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-4324</guid>
		<description>[...]  http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/  [...]</description>
		<content:encoded><![CDATA[<p>[...]  <a href="http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/" rel="nofollow">http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/</a>  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: andrew</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-4024</link>
		<dc:creator>andrew</dc:creator>
		<pubDate>Sun, 05 Jul 2009 11:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-4024</guid>
		<description>Valid point about sending bytes to GL.  Floats are less ambiguous and so always better to use if the library doesn&#039;t just convert strainght back :-)    

Can I be so rude as to suggest code like the following for the XRender case:

&lt;code&gt;
const float alpha = 0.8f; // from top
...
const int  xr_alpha = 257 * alpha; // Note: 257*0xff = 0xffff
col.red = unsigned short(xr_alpha * color.red());  // XRenderColor uses 16 bit color
...
&lt;/code&gt;

May be overly pedantic but its how I think - sorry :-/
Anyway, thanks very much for posting a tutorial on this stuff.  Very much appreciated.</description>
		<content:encoded><![CDATA[<p>Valid point about sending bytes to GL.  Floats are less ambiguous and so always better to use if the library doesn&#8217;t just convert strainght back <img src='http://blog.martin-graesslin.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />     </p>
<p>Can I be so rude as to suggest code like the following for the XRender case:</p>
<p><code><br />
const float alpha = 0.8f; // from top<br />
...<br />
const int  xr_alpha = 257 * alpha; // Note: 257*0xff = 0xffff<br />
col.red = unsigned short(xr_alpha * color.red());  // XRenderColor uses 16 bit color<br />
...<br />
</code></p>
<p>May be overly pedantic but its how I think &#8211; sorry :-/<br />
Anyway, thanks very much for posting a tutorial on this stuff.  Very much appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Martin</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-3993</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Sat, 04 Jul 2009 15:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-3993</guid>
		<description>@andrew: yes using redF() would be better - I&#039;ll change that. But I want to point out two points: first QColor stores the color value as an int and OpenGL uses floats. Sending an int to the graphics engine just will cause the same calculations and sending double - well that doesn&#039;t improve anything. And given that qreal is mostly double kind of my logic is even better ;-)</description>
		<content:encoded><![CDATA[<p>@andrew: yes using redF() would be better &#8211; I&#8217;ll change that. But I want to point out two points: first QColor stores the color value as an int and OpenGL uses floats. Sending an int to the graphics engine just will cause the same calculations and sending double &#8211; well that doesn&#8217;t improve anything. And given that qreal is mostly double kind of my logic is even better <img src='http://blog.martin-graesslin.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: andrew</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-3989</link>
		<dc:creator>andrew</dc:creator>
		<pubDate>Sat, 04 Jul 2009 12:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-3989</guid>
		<description>picky question... you use the code
&lt;code&gt;glColor4f( color.red() / 255.0f, color.green() / 255.0f, color.blue() / 255.0f, alpha );&lt;/code&gt;

which exposes and hard codes colour precision for no clear reason (something I dislike) and involves implicit floatint conversion which has known performance issues on some platforms (see for example http://www.mega-nerd.com/FPcast/)... so I was just wondering:
1. Why not use glColor4b or
2. why not use redF(), greenF() etc. probably with  glColour4d (as qreal is double for most platforms) 

Later code also involves a lot of integer to float conversion also. Sorry - I&#039;m not trying to be rude or a smart-arse.  I guess I&#039;m just suggesting that minimising the number of implicit casts going on would be good practice.  Especially in example code that people are going to model their own code on.</description>
		<content:encoded><![CDATA[<p>picky question&#8230; you use the code<br />
<code>glColor4f( color.red() / 255.0f, color.green() / 255.0f, color.blue() / 255.0f, alpha );</code></p>
<p>which exposes and hard codes colour precision for no clear reason (something I dislike) and involves implicit floatint conversion which has known performance issues on some platforms (see for example <a href="http://www.mega-nerd.com/FPcast/" rel="nofollow">http://www.mega-nerd.com/FPcast/</a>)&#8230; so I was just wondering:<br />
1. Why not use glColor4b or<br />
2. why not use redF(), greenF() etc. probably with  glColour4d (as qreal is double for most platforms) </p>
<p>Later code also involves a lot of integer to float conversion also. Sorry &#8211; I&#8217;m not trying to be rude or a smart-arse.  I guess I&#8217;m just suggesting that minimising the number of implicit casts going on would be good practice.  Especially in example code that people are going to model their own code on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: jospoortvliet</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-3963</link>
		<dc:creator>jospoortvliet</dc:creator>
		<pubDate>Fri, 03 Jul 2009 16:19:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-3963</guid>
		<description>I put a link on techbase, but this should indeed get on techbase itself...</description>
		<content:encoded><![CDATA[<p>I put a link on techbase, but this should indeed get on techbase itself&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Aaron Seigo</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-3930</link>
		<dc:creator>Aaron Seigo</dc:creator>
		<pubDate>Thu, 02 Jul 2009 19:29:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-3930</guid>
		<description>this should totally be copy and pasted onto techbase in the tutorials section! :)

as for compiz, i agree that they&#039;ve gone completely overboard with their configuration. great fun for tweaking, but impossible to use in real environments with regular joe&#039;s. 

contrast: kwin&#039;s ability to easily select effects for things like window switching is elegant and actually passes the &quot;my non-geek friends are able to use it&quot; test :)</description>
		<content:encoded><![CDATA[<p>this should totally be copy and pasted onto techbase in the tutorials section! <img src='http://blog.martin-graesslin.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>as for compiz, i agree that they&#8217;ve gone completely overboard with their configuration. great fun for tweaking, but impossible to use in real environments with regular joe&#8217;s. </p>
<p>contrast: kwin&#8217;s ability to easily select effects for things like window switching is elegant and actually passes the &#8220;my non-geek friends are able to use it&#8221; test <img src='http://blog.martin-graesslin.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Martin</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-3920</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Thu, 02 Jul 2009 14:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-3920</guid>
		<description>@Mr Mister: please note that Compiz is not a GNOME application but an independent project. Personally I think Compiz offers too many configurations and even kwin offers too many (e.g. cube - that&#039;s my fault). Where it makes sense we need configuration and where it does not make sense we don&#039;t need and I&#039;m hardly aware of anything that needs more configuration.

Btw: if you want a config option just report a wish on http://bugs.kde.org</description>
		<content:encoded><![CDATA[<p>@Mr Mister: please note that Compiz is not a GNOME application but an independent project. Personally I think Compiz offers too many configurations and even kwin offers too many (e.g. cube &#8211; that&#8217;s my fault). Where it makes sense we need configuration and where it does not make sense we don&#8217;t need and I&#8217;m hardly aware of anything that needs more configuration.</p>
<p>Btw: if you want a config option just report a wish on <a href="http://bugs.kde.org" rel="nofollow">http://bugs.kde.org</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Mr Mister</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-3919</link>
		<dc:creator>Mr Mister</dc:creator>
		<pubDate>Thu, 02 Jul 2009 13:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-3919</guid>
		<description>Maybe next a guide to how to write a proper configuration window/settings for the effect just created? Odd that KDE vs GNOME is always seen that GNOME is for small children and idiots whereas KDE stands for the tweak-everything-geeks but I can&#039;t even adjust 10 % of the stuff in KWin that is there in Compiz.</description>
		<content:encoded><![CDATA[<p>Maybe next a guide to how to write a proper configuration window/settings for the effect just created? Odd that KDE vs GNOME is always seen that GNOME is for small children and idiots whereas KDE stands for the tweak-everything-geeks but I can&#8217;t even adjust 10 % of the stuff in KWin that is there in Compiz.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Tuukka</title>
		<link>http://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/comment-page-1/#comment-3912</link>
		<dc:creator>Tuukka</dc:creator>
		<pubDate>Thu, 02 Jul 2009 10:53:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.martin-graesslin.com/blog/?p=258#comment-3912</guid>
		<description>I&#039;m very happy to hear you are making improvements to the resize effect! I actually submitted a wishlist bug a while ago about the very feature you describe  (#182456). I hope the necessary API change will be made that the contents don&#039;t have to be shown...

Oh, and thanks for the howto!</description>
		<content:encoded><![CDATA[<p>I&#8217;m very happy to hear you are making improvements to the resize effect! I actually submitted a wishlist bug a while ago about the very feature you describe  (#182456). I hope the necessary API change will be made that the contents don&#8217;t have to be shown&#8230;</p>
<p>Oh, and thanks for the howto!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

