<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Txzone</title>
	<atom:link href="http://txzone.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://txzone.net</link>
	<description>Stuff about Python, multitouch, optical tracking and audio</description>
	<lastBuildDate>Mon, 12 Mar 2012 09:43:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>IOS Support for Kivy</title>
		<link>http://txzone.net/2012/03/ios-support-for-kivy/</link>
		<comments>http://txzone.net/2012/03/ios-support-for-kivy/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 22:45:42 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=479</guid>
		<description><![CDATA[Kivy has now added official support for IOS platform. You can now package your Kivy application for the Ipad (and other iOS devices, testers needed). The current instructions are available here: http://kivy.org/docs/guide/packaging-ios.html For the full story on the multiple Apple &#8230; <a href="http://txzone.net/2012/03/ios-support-for-kivy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Kivy has now added <a href="https://groups.google.com/d/topic/kivy-users/EoujXCpMSSk/discussion">official support for IOS platform</a>. You can now package your Kivy application for the Ipad (and other iOS devices, testers needed).</p>
<p>The current instructions are available here: <a href="http://kivy.org/docs/guide/packaging-ios.html">http://kivy.org/docs/guide/packaging-ios.html</a></p>
<p>For the full story on the multiple Apple limitations we are working with, i want to share the hardest part for Python integration: Apple&#8217;s prohibition on using dlopen() to load dynamic libraries.<br />
In a typical case, a compiled Python library&#8217;s extension is a &#8220;.so&#8221;, and the &#8220;.so&#8221; is dlopen() at import.</p>
<p>That being said, as we did for the <a href="http://txzone.net/2012/01/introducing-python-for-android/">python-for-android</a> project published in January, we are redirecting the compilation object to create static libraries. Theses libraries are included in the final application binary. But it&#8217;s not enough: we must also tell to Python to look for the library entry point in the application binary, instead of dlopen(). So in the python dynload loader:</p>
<pre>return (dl_funcptr) dlsym(RTLD_MAIN_ONLY, funcname)</pre>
<p>This way, Python will always look at the application binary, and never need to use dlopen().</p>
<p>If you are worried that Apple would reject a Python-based application, or even using Kivy altogether, we have tested it for you: the game that won the Kivy contest has been packaged for IOS, submitted to Apple&#8230; and accepted. You can found <a href="http://itunes.apple.com/us/app/deflectouch/id505729681">Deflectouch on iTunes</a> (<a href="https://github.com/stocyr/Deflectouch">source code</a>).</p>
<p>Anyway, <a href="http://kivy.org">Kivy</a> is now officially supporting 5 platforms: Windows, Linux, MacOSX, Android and IOS!</p>
<p>Enjoy <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2012/03/ios-support-for-kivy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kivy programming contest #1 is over!</title>
		<link>http://txzone.net/2012/02/kivy-programming-contest-1-is-over/</link>
		<comments>http://txzone.net/2012/02/kivy-programming-contest-1-is-over/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 10:34:54 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=462</guid>
		<description><![CDATA[During January, we hosted a contest for promoting the Kivy framework. The goal was simple: create a game using Kivy, without external non-pure python dependencies. All the entries have been submitted on our sponsor Github (and thanks to NotionInk), under &#8230; <a href="http://txzone.net/2012/02/kivy-programming-contest-1-is-over/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>During January, we hosted a contest for promoting the <a href="http://kivy.org/">Kivy</a> framework. The goal was simple: create a game using Kivy, without external non-pure python dependencies. All the entries have been submitted on our sponsor <a href="http://github.com/">Github</a> (and thanks to <a href="http://notionink.com">NotionInk</a>), under a compatible OSS licence. The contest registered 21 entries, and <a href="http://kivy.org/#contest">11 submissions</a> was valid.</p>
<p><a href="http://kivy.org/#contest"><img alt="" src="http://kivy.org/slides/contest2012-end-featured.jpg" class="aligncenter" width="580" height="260" /></a></p>
<p>Our winners are:</p>
<ol>
<li>
		<a href="https://github.com/stocyr/Deflectouch">Deflectouch</a>, from Cyril Stoller
	</li>
<li>
		<a href="https://github.com/Zogg/FishLife">FishLife</a>, from Zogg
	</li>
<li>
		<a href="https://github.com/niavlys/memoryKivy">memoryKivy</a>, from Niavlys
	</li>
<li>
		<a href="https://github.com/dcower/centripetal">Centripetal</a>, from Dilon Cower
	</li>
<li>
		<a href="https://github.com/wilsaj/flingy">Flingy</a>, from Andy Wilson
	</li>
</ol>
<p>In term of numbers, everything is growing:</p>
<ul>
<li>19919 unique visitors for the website (vs 9772 in December)</li>
<li>+56 subscribers on the mailing list (192 in total)</li>
<li>229 messages on kivy-users (vs 94 in December)</li>
<li>23 pull requests (vs 6 in December)</li>
</ul>
<p>That was a great event so far, with a perfect timing: Kivy have now 1 year old! (first release was 1st February 2011).</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2012/02/kivy-programming-contest-1-is-over/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing &#8220;Python for Android&#8221;</title>
		<link>http://txzone.net/2012/01/introducing-python-for-android/</link>
		<comments>http://txzone.net/2012/01/introducing-python-for-android/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 16:20:06 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[PyMT]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=430</guid>
		<description><![CDATA[I&#8217;m glad to share a new project called Python for Android. The goal of this project is to package your python application into an APK. https://github.com/kivy/python-for-android The project is under the umbrella of Kivy organization, but is not designed to &#8230; <a href="http://txzone.net/2012/01/introducing-python-for-android/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m glad to share a new project called <a href="https://github.com/kivy/python-for-android">Python for Android</a>. The goal of this project is to <strong>package your python application into an APK</strong>.</p>
<p><a href="https://github.com/kivy/python-for-android">https://github.com/kivy/python-for-android</a></p>
<p>The project is under the umbrella of Kivy organization, but is not designed to be limited to Kivy only. Read the documentation to correctly install the NDK/SDK Android, and set the needed environment variables.</p>
<p>The packaging is done in 4 steps:<br />
1. Ensure you have Android SDK/NDK downloaded and correctly installed<br />
2. Ensure you have some environment set<br />
3. Create a Python distribution containing the selected modules<br />
4. Use that distribution to build an APK of your Python application</p>
<p>Creating the python distribution is as simple as that:</p>
<pre>
# create a simple distribution with python + PIL + Kivy
./distribute.sh -m "pil kivy"

# create a distribution with python + openssl + pil + kivy
./distribute.sh -m "openssl pil kivy"
</pre>
<p>A directory <code>dist/default</code> will be created, including the result of the whole arm compilation.<br />
Available libraries as for today: jpeg pil png sdl sqlite3 pygame kivy android libxml2 libxslt lxml ffmpeg openssl.</p>
<p>The second step is a little bit harder, since you need to provide more information for Android:</p>
<pre>
cd dist/default
./build.py --package org.test.touchtracer --name touchtracer \
--version 1.0 --dir ~/code/kivy/examples/demo/touchtracer debug installd

# --package: java name of your application
# --name: title of your application
# --version: version of your application
# --dir: location of your application containing the main.py
</pre>
<p>Then you&#8217;ll get a nicely <code>bin/touchtracer-1.0-debug.apk</code></p>
<p>Pro:</p>
<ul>
<li>A blacklist.txt file that can be used to exclude files in the final APK</li>
<li>Reusable distribution for other applications</li>
<li>Modular recipes architecture</li>
<li>Be able to build independents python distributions</li>
</ul>
<p>Cons:</p>
<ul>
<li>You need a main.py file that will be used for starting your application</li>
<li>Only one java bootstrap available, using OpenGL ES 2.0.</li>
<li>Only Kivy toolkit is working. I&#8217;m sure that other people can enhance it to add other toolkit recipes. But for example, pygame is not gonna to work because the android project is OpenGL ES 2.0: pygame drawing will not work.</li>
</ul>
<p>I hope you&#8217;ll like it <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><em>We would like to thank Renpy / PGS4A for its initial pygame for android project</em></p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2012/01/introducing-python-for-android/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Kivy programming contest #1</title>
		<link>http://txzone.net/2011/12/kivy-programming-contest-1/</link>
		<comments>http://txzone.net/2011/12/kivy-programming-contest-1/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 10:29:55 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=422</guid>
		<description><![CDATA[Kivy, an open source project for building cross platform applications and user interfaces, is announcing its 1st programming contest. The contest will start with the publication of official rules on January 1st. Registrations will be accepted through January 25th, and &#8230; <a href="http://txzone.net/2011/12/kivy-programming-contest-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://txzone.net/wp-content/uploads/2011/12/kivy-icon-128.png" alt="" title="kivy-icon-128" width="128" height="128" class="alignright size-full wp-image-424" /></p>
<p><a href="http://kivy.org/">Kivy</a>, an open source project for building cross platform applications and user interfaces, is announcing its 1st programming contest. The contest will start with the publication of official rules on January 1st. Registrations will be accepted through January 25th, and submissions will be accepted through January 31st. Prizes include Nvidia Tegra 2 android tablets from NotionInk, One-year “bronze” plans and t-shirts.</p>
<p>The goal of the contest is to encourage interested developers to learn more about Kivy, which is a cross platform Application and User Interface software library for the python programming language. Kivy applications run on Linux, Windows, OSX, Android (and iOS).  The framework supports most inputs protocols and devices like WM_Touch, WM_Pen, Mac OS X Trackpad and Magic Mouse, single/multi touch screens, Mtdev, Linux Kernel HID, TUIO, and uses pure hardware accelerated rendering to enable developers to really take user interfaces to a new level.</p>
<p>The contest is sponsored by <a href="http://www.notionink.com/">NotionInk</a>, an indian company that designs tablets PCs, and <a href="http://github.com/">Github</a>, a web-based hosting service for software developments projects.</p>
<p>Join the contest at : <a href="http://kivy.org/#contest">http://kivy.org/#contest</a></p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/12/kivy-programming-contest-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kivy 1.0.8 released ! What&#8217;s next ?</title>
		<link>http://txzone.net/2011/10/kivy-1-0-8-released-whats-next/</link>
		<comments>http://txzone.net/2011/10/kivy-1-0-8-released-whats-next/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 23:09:07 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=403</guid>
		<description><![CDATA[101 days after 1.0.7, Kivy 1.0.8 have been released (changelog). This release include: New widgets: Virtual Keyboard, Accordion, ProgressBar Video support on android &#8211; Python bindings for ffmpeg have been done and are available on github. Theses are focused to &#8230; <a href="http://txzone.net/2011/10/kivy-1-0-8-released-whats-next/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>101 days after 1.0.7, <a href="http://kivy.org/">Kivy 1.0.8</a> have been released (<a href="http://kivy.org/#changelog">changelog</a>).</p>
<p><img src="http://txzone.net/wp-content/uploads/2011/10/kivy-1.0.81.jpg" alt="" title="Kivy 1.0.8 - Virtual Keyboard - Accordion Widget" width="600" height="256" class="aligncenter size-full wp-image-405" /></p>
<p>This release include:</p>
<ul>
<li>New widgets: Virtual Keyboard, Accordion, ProgressBar</li>
<li>Video support on android &#8211; <a href="http://github.com/tito/ffmpeg-android">Python bindings for ffmpeg</a> have been done and are available on github. Theses are focused to be usable on android within Kivy project, but any help to clean and make the code more crossplatform is welcome !</li>
<li>Scroll wheel support in scrollview</li>
<li>+ 1.6x more performance on Kivy langage</li>
<li>Support for GIF image + set of images in Zip files</li>
<li>Bezier and stipple lines in graphics instructions</li>
<li>&#8230; and lot of improvements and fixes !</li>
</ul>
<p>A documentation translation project have been <a href="https://groups.google.com/d/topic/kivy-dev/2s5sA8PHb4U/discussion">started</a> (thanks for <a href="http://sphinx.pocoo.org/">Sphinx</a> for generating gettext translations automatically from python autodoc). Help us at: <a href="http://translation.kivy.org/">http://translation.kivy.org/</a>.</p>
<p>And now, where to go ?</p>
<p>The roadmap is not written, since what we do is mostly depending of our interests / jobs / contributions.<br />
But community is growing fast ! I see <a href="https://github.com/tito/kivy/pull/281">$N multistroke recognizer</a>, GSOC integration (better macosx integration), iOS port, better android packaging, unit test, better desktop integration, widget theming support, 3D graphics instructions&#8230;</p>
<p>If you still hesitating about using Kivy&#8230; just look at the frontpage for the current awesome projects made by the community. And they are lot of others projects going to be released during the next month ! We are also glad to see some big companies to use Kivy as the base for building their products.<br />
If you have also cool project going on, don&#8217;t hesitate to share <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To finish, here is a video from Cyril that playing on <a href="https://github.com/stocyr/IcarusTouch">Icarus Touch</a>, an instrument that use Kivy for his UI. Awesome work !</p>
<p><object width="420" height="315"><param name="movie" value="http://www.youtube.com/v/u4NRu7mBXtA?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/u4NRu7mBXtA?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/10/kivy-1-0-8-released-whats-next/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing perl errors when using gitolite + ssh + custom locales</title>
		<link>http://txzone.net/2011/10/fixing-perl-errors-when-using-gitolite-ssh-custom-locales/</link>
		<comments>http://txzone.net/2011/10/fixing-perl-errors-when-using-gitolite-ssh-custom-locales/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 09:44:09 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=395</guid>
		<description><![CDATA[If you have locale issues on a server, and your server is english only, this kind of issues can happen: $ git push origin master perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = &#8230; <a href="http://txzone.net/2011/10/fixing-perl-errors-when-using-gitolite-ssh-custom-locales/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have locale issues on a server, and your server is english only, this kind of issues can happen:</p>
<pre>
$ git push origin master
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MESSAGES = "fr_FR.UTF-8",
	LC_COLLATE = "fr_FR.UTF-8",
	LC_CTYPE = "fr_FR.UTF-8",
	LANG = "en_US.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Everything up-to-date
</pre>
<p>You might want to check your <code>/etc/ssh/sshd_config</code> and look at the <code>AcceptEnv</code> token.<br />
On this ssh server, it was:</p>
<pre>
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
</pre>
<p>My locale environment was passed to the server, but the server doesn&#8217;t know about fr. Since i don&#8217;t want to install fr locales, just comment that line:</p>
<pre>
# Allow client to pass locale environment variables
# AcceptEnv LANG LC_*
</pre>
<p>Done.</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/10/fixing-perl-errors-when-using-gitolite-ssh-custom-locales/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Texture compression, why does it matter ?</title>
		<link>http://txzone.net/2011/09/texture-compression-why-does-it-matter/</link>
		<comments>http://txzone.net/2011/09/texture-compression-why-does-it-matter/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 10:44:22 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=378</guid>
		<description><![CDATA[We all care about cash, time, life, love, and if you&#8217;re doing computer graphics, you might care about the memory consumption of your graphics card. Why ? For the same reason when you running out of cash I&#8217;ll explain why &#8230; <a href="http://txzone.net/2011/09/texture-compression-why-does-it-matter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://txzone.net/wp-content/uploads/2011/09/museotouch2.png"><img src="http://txzone.net/wp-content/uploads/2011/09/museotouch2-300x168.png" alt="" title="Museotouch" width="300" height="168" class="alignright size-medium wp-image-390" /></a></p>
<p>We all care about cash, time, life, love, and if you&#8217;re doing computer graphics, you might care about the memory consumption of your graphics card. Why ? For the same reason when you running out of cash <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ll explain why does it matter to compress texture, and compare available possibilities. My personnal goal is to be able to load a lot of FULL HD pictures on tablet, for a museum project. The analysis is focused on DXT1 compression and size. I&#8217;m looking forward to ETC1 and will update that blog post with the result in the future.</p>
<h2>What are we dealing with</h2>
<p>If you are doing an application that display lot of hd pictures, that&#8217;s matter. We&#8217;ll start from this simple math statement: a full HD picture is 1980&#215;1020 with 4 channels (RGBA). Whatever if your pictures is in PNG, or JPEG, your graphics card is not able to understand it, and will store it in its memory decompressed. So this image will eat:</p>
<p><code>1920 x 1080 x 4 = 8294400 bytes = 7.91MB</code><br />
<code>1920 x 1080 x 4 + mipmaps = 10769252 bytes = 10.27MB</code></p>
<p>In theory. Because it might be more if your graphics card doesn&#8217;t support NPOT texture. If not, usually, the texture will be resized to the closest POT texture available, mean for us: 2048 x 2048. Then the size for POT will be:</p>
<p><code>2048 x 2048 x 4 = 16777216 bytes = 16MB</code><br />
<code>2048 x 2048 x 4 + mipmaps = 22369620 bytes = 21MB</code></p>
<h2>Compressions types</h2>
<p>They are plenty types of compression availables. The most common are S3TC (including DXT1, DXT3, DXT5) from Savage3 originally, LATC from Nvidia, PVRTC from PowerVR, ETC1 from Ericsson&#8230;</p>
<p>Not all of them are available everywhere, and it&#8217;s depending a lot from your hardware. Here is a list of tablet / vendor / texture compression available. (only tablet, not desktop computer.) Thanks to this <a href="http://stackoverflow.com/questions/3881197/opengl-es-2-0-extensions-on-android-devices">stackoverflow thread  about supported OpenGL ES 2.0 extensions on Android devices</a></p>
<table>
<tbody>
<tr>
<th>Tablette</th>
<th>Vendor</th>
<th><a href="http://www.opengl.org/registry/specs/EXT/texture_compression_dxt1.txt">DXT1</a></th>
<th><a href="http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt">S3TC</a></th>
<th><a href="http://www.opengl.org/registry/specs/EXT/texture_compression_latc.txt">LATC</a></th>
<th><a href="http://www.khronos.org/registry/gles/extensions/IMG/IMG_texture_compression_pvrtc.txt">PVRTC</a></th>
<th><a href="http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt">ETC1</a></th>
<th><a href="http://en.wikipedia.org/wiki/3Dc">3DC</a></th>
<th>ATC</th>
</tr>
<tr>
<td>(desktop computer) GeForce GTX 560</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<tr>
<td>Motorola Xoom</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Nexus One</td>
<td>Qualcom</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Toshiba Folio</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>LGE Tablet</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Galaxy Tab</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Acer Stream</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Desire Z</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Spica</td>
<td>Samsumg</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>HTC Desire</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>VegaTab</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Nexus S</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>HTC Desire HD</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>HTC Legend</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Samsung Corby</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Droid 2</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Galaxy S</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Milestone</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>We are seeing that ETC1 is standard compression for OpenGL ES 2, unfortunately, it will not work on desktop.<br />
PVRTC is specific to PowerVR device: it&#8217;s a standard on Ipad/Iphone.</p>
<h2>Using DXT1</h2>
<p>If you use DXT1, you need a POT image. DXT1 doesn&#8217;t work on NPOT.</p>
<p>To convert any image to DXT1 without any tool, you must know that your graphics card is capable of doing it, using specials opengl functions. But i wanted to precalculate them.<br />
<a href="http://code.google.com/p/nvidia-texture-tools/">Nvidia texture tools</a> contains tools for converting them, but you need an Nvidia card. For all others, you might want to look at <a href="http://code.google.com/p/libsquish/">Libsquish</a>. It&#8217;s designed to compress in software a raw image to DXTn.<br />
The result will be not a DXT1 &#8220;file&#8221;, because DXT1 is the compression format. The result will be stored in a DDS file, that we&#8217;ll see later about it.</p>
<p>If you want to be able to use libssquish in Python, you might want to apply my <a href="http://code.google.com/p/libsquish/issues/attachmentText?id=17&#038;aid=170001000&#038;name=libsquish-python-binding.patch&#038;token=c82cbbd3c5b614a8d798d832dedf126c">patch available on their issue tracker</a></p>
<p>For DXT1, the size of the file is not depending of the image content:</p>
<p><code>DXT1 2048x2048 RGBA = 2097152 bytes = 2MB</code></p>
<p>That&#8217;s already a big improvement. DXTn is able to store mipmaps of the texture too. For this size, the calculation is:</p>
<p><code>DXT1 2048x2048 RGBA + mipmap = 2795520 bytes = 2.73MB</code></p>
<h2>Comparaison table</h2>
<table>
<tr>
<th>Type</th>
<th>Resolution</th>
<th>File size</th>
<th>GPU size</th>
<th>Images in a 256MB GPU</th>
<th>Images in a 512MB GPU</th>
</tr>
<tr>
<td>Raw RGBA image (POT)</td>
<td>2048 x 2048</td>
<td>-</td>
<td>16384KB</td>
<td>16</td>
<td>32</td>
</tr>
<tr>
<td>PNG image (NPOT)</td>
<td>1920 x 1080</td>
<td>4373KB</td>
<td>8040KB</td>
<td>32</td>
<td>65</td>
</tr>
<tr>
<td>PNG Image in reduced POT resolution</td>
<td>1024 x 1024</td>
<td>1268KB</td>
<td>4096KB</td>
<td>64</td>
<td>128</td>
</tr>
<tr>
<td>DXT1 without mipmap</td>
<td>2048 x 2048</td>
<td>2048KB</td>
<td>2048KB</td>
<td>128</td>
<td>256</td>
</tr>
<tr>
<td>DXT1 without mipmap, reduced</td>
<td>1024 x 1024</td>
<td>512KB</td>
<td>512KB</td>
<td>512</td>
<td>1024</td>
</tr>
<tr>
<td>DXT1 with mipmap</td>
<td>2048 x 2048</td>
<td>2730KB</td>
<td>2730KB</td>
<td>96</td>
<td>192</td>
</tr>
<tr>
<td>DXT1 with mipmap, reduced</td>
<td>1024 x 1024</td>
<td>682KB</td>
<td>682KB</td>
<td>384</td>
<td>768</td>
</tr>
</table>
<p>As soon as we use compression, what we see is:</p>
<ol>
<li>The file size is the same as GPU size</li>
<li>Even with POT texture compared to NPOT dxt1, we can still store 4x more images in GPU</li>
</ol>
<h2>And with Kivy ?</h2>
<p>DXT1 itself is the compression format, but you cannot actually use it like that. You need to store the result is a formatted file. <a href="http://msdn.microsoft.com/en-us/library/bb943991.aspx/">DDS</a>.</p>
<p><a href="http://kivy.org/">Kivy</a> is already able to read DDS files. But you must ensure that your graphics card is supporting DXT1 or S3TC. Look at <a href="http://kivy.org/docs/api-kivy.graphics.opengl_utils.html?highlight=dxt#kivy.graphics.opengl_utils.gl_has_capability">gl_has_capability()</a> function in Kivy then.</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/09/texture-compression-why-does-it-matter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Kivy at EuroPython &#8211; Lightning explanation</title>
		<link>http://txzone.net/2011/06/kivy-at-europython-lightning-explanation/</link>
		<comments>http://txzone.net/2011/06/kivy-at-europython-lightning-explanation/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 13:46:27 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=365</guid>
		<description><![CDATA[For all the guys that was interested about Kivy lightning talk at EuroPython 2011, due to some incomprehension about what is Kivy, here is a lightning explanation to make it clear. Kivy is a Python framework designed for creating of &#8230; <a href="http://txzone.net/2011/06/kivy-at-europython-lightning-explanation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://kivy.org/"><img src="http://txzone.net/wp-content/uploads/2011/06/kivy-icon-64.png" alt="" title="kivy-icon-64" width="64" height="64" class="alignright size-full wp-image-368" /></a><br />
For all the guys that was interested about Kivy lightning talk at <a href="ep2011.europython.eu">EuroPython 2011</a>, due to some incomprehension about what is Kivy, here is a lightning explanation to make it clear.</p>
<p><a href="http://kivy.org/">Kivy</a> is a Python framework designed for creating of Natural Users Interfaces. The framework containing abstraction for loading image, video, audio. It have a complete new approach about input events, and widgets. For example, you can use lot of widgets at the _same_ time, something not really possible in classical framework (qt, gtk&#8230;): try to touch on a button while selecting something in a list. This is not only about multitouch for one user, but also for multi users. Kivy graphics engine is in OpenGL ES2, and all the widgets are using it.</p>
<p>If you write an application in top of Kivy, you can deploy it on Linux, MacOSX, Windows and Android. Without changing anything in your code. Because it&#8217;s in Python.</p>
<p>The presentation tool i&#8217;ve used is <a href="http://github.com/tito/presemt">PreseMT</a>. It have been made by <a href="http://the-space-station.com">Christopher</a> and <a href="http://txzone.net/">Me</a>. And it&#8217;s an application built using Kivy. A version of this tool is already published on <a href="https://market.android.com/details?id=org.kivy.presemt">Android Market</a>.<br />
PreseMT have been written in one week, and use lot of Kivy features. But it&#8217;s still not finished, and we are missing lot of features, like the ability to export the presentation in a &#8220;good&#8221; format. We have plan to make an export in HTML5, that will support animation too.</p>
<p>Feel free to follow me on <a href="https://twitter.com/#!/mathieuvirbel">@mathieuvirbel</a> ! </p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/06/kivy-at-europython-lightning-explanation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Recording OpenGL output to H264 video</title>
		<link>http://txzone.net/2011/06/recording-opengl-output-to-h264-video/</link>
		<comments>http://txzone.net/2011/06/recording-opengl-output-to-h264-video/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 10:48:48 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Gstreamer]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=350</guid>
		<description><![CDATA[Apitrace is a tool for recording all the gl commands in a trace file. The trace file can be replay in later time, and they got a nice gui for checking all the gl call every frame, with introspection. They &#8230; <a href="http://txzone.net/2011/06/recording-opengl-output-to-h264-video/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/apitrace/apitrace">Apitrace</a> is a tool for recording all the gl commands in a trace file. The trace file can be replay in later time, and they got a nice gui for checking all the gl call every frame, with introspection. They have a glretrace software that replay a trace file. We can use it to get the output of everyframe and push it in a gstreamer pipeline to make a video.</p>
<p>Why not using gtkRecordMyDesktop or other screen capture ? Sometime, the overhead of capturing and encoding video on live take too much CPU. And the application start to slow down. I didn&#8217;t see any slowdown using apitrace, and the trace file is very small compared to video output or raw video output.</p>
<p>So first, compile apitrace with stdout support:</p>
<pre>
$ git clone git://github.com/tito/apitrace.git
$ cd apitrace
$ git checkout snapshot-stdout
$ mkdir build
$ cd build
$ cmake ..
$ make
</pre>
<p>Take any opengl application, and make a trace file. The trace file will have the name of the binary. In my case, python is an alias to python2.7: the trace file will be python2.7.trace.</p>
<pre>
$ LD_PRELOAD=./glxtrace.so python ~/code/kivy/examples/demo/pictures/main.py
# replay for fun now
$ ./glretrace python2.7.trace
</pre>
<p>To be able to make a video from the trace file, you need to know the size of the window, and the initial framerate. Here, my example is running at 800&#215;600, 60fps:</p>
<pre>
$ ./glretrace -sr python2.7-trace | \
  gst-launch fdsrc ! \
  videoparse width=800 height=600 format=rgbx framerate=60 ! \
  videoflip method=5 ! videorate ! ffmpegcolorspace ! \
  video/x-raw-yuv,width=800,height=600,framerate=\(fraction\)30/1 \
   x264enc pass=quant ! avimux ! filesink location=output.avi
</pre>
<p>The final video will be saved in output.avi. You can check the video output here :</p>
<p><iframe width="425" height="349" src="http://www.youtube.com/embed/5vTHyxw91Ec" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/06/recording-opengl-output-to-h264-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designing Configuration and Settings UI for Kivy</title>
		<link>http://txzone.net/2011/06/designing-configuration-and-settings-ui-for-kivy/</link>
		<comments>http://txzone.net/2011/06/designing-configuration-and-settings-ui-for-kivy/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 12:19:29 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=320</guid>
		<description><![CDATA[From 3 weeks now, i&#8217;m working on packaging kivy application, to create a installer/bundle/deb of a Kivy application. The reason is simple: as soon as you are doing an application, the user should not care about installing Kivy itself. In &#8230; <a href="http://txzone.net/2011/06/designing-configuration-and-settings-ui-for-kivy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>From 3 weeks now, i&#8217;m working on packaging kivy application, to create a installer/bundle/deb of a Kivy application. The reason is simple: as soon as you are doing an application, the user should not care about installing Kivy itself. In the same time, i&#8217;ve work on other projects that require to have their own configuration. From a long time, we always wanted to have some in-app settings for configure Kivy. Even Android have a &#8220;settings&#8221; button, we wanted to use it. <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is now possible.</p>
<p><img src="http://txzone.net/wp-content/uploads/2011/06/app-settings.jpg" alt="" title="Kivy settings" width="631" height="269" class="aligncenter size-full wp-image-321" /></p>
<p>Yes, it look like the honeycomb settings panel. Kind of. Well.</p>
<p>The configuration is automatically handled by the App class, and you can put your own token on it. The settings UI (that you&#8217;re seeing on the screen) is created from a JSON definitions. You can press F1 or the settings key on android to bring the settings panel, hook the on_config_change to know when a configuration token is changed from the settings ui, etc.</p>
<p>This is available in master, and will be published on next 1.0.7 version. If you are interested, please read and give feedback about the <a href="http://kivy.org/docs/api-kivy.app.html ">App documentation</a> and the <a href="http://kivy.org/docs/api-kivy.uix.settings.html">Settings documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/06/designing-configuration-and-settings-ui-for-kivy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

