<?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"
	>

<channel>
	<title>Ingrater's 3D Blog</title>
	<atom:link href="http://3d.benjamin-thaut.de/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://3d.benjamin-thaut.de</link>
	<description>3D Developement Blog</description>
	<pubDate>Sat, 03 Apr 2010 12:32:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Winamp AlienFX Plugin</title>
		<link>http://3d.benjamin-thaut.de/?p=14</link>
		<comments>http://3d.benjamin-thaut.de/?p=14#comments</comments>
		<pubDate>Sat, 03 Apr 2010 12:28:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[alienfx]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[winamp]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=14</guid>
		<description><![CDATA[I made plugin for Alienwares AlienFX Device that comes with every Alienware laptop and computer. Currently the following models are supported:

Area51 m15x
All Powerfull m15x
All Powerfull m17x
All Powerfull m11x

A demonstration of the plugin by Lord_Zath form NBR (www.notebookreview.com) can be found at:
www.youtube.com/watch?v=dLymX4fLVtc
Download: vis_alienfx.zip (257 kb)
Please be shure to read the README file. It contains important instructions [...]]]></description>
			<content:encoded><![CDATA[<p>I made plugin for <a href="http://www.alienware.com">Alienwares</a> AlienFX Device that comes with every <a href="http://www.alienware.com">Alienware</a> laptop and computer. Currently the following models are supported:</p>
<ul>
<li>Area51 m15x</li>
<li>All Powerfull m15x</li>
<li>All Powerfull m17x</li>
<li>All Powerfull m11x</li>
</ul>
<p>A demonstration of the plugin by Lord_Zath form NBR (<a href="http://www.notebookreview.com">www.notebookreview.com</a>) can be found at:<br />
<a href="http://www.youtube.com/watch?v=dLymX4fLVtc">www.youtube.com/watch?v=dLymX4fLVtc</a></p>
<p><strong>Download:</strong> <a href="http://3d.benjamin-thaut.de/Files/file.php?id=6">vis_alienfx.zip (257 kb)</a></p>
<p>Please be shure to read the README file. It contains important instructions howto setup and configure the plugin! Also I want to thank Lord_Zath for helping me test the plugin and writing the README file. A thank you also goes to all the people on NBR which are taking part in the developement of this plugin.</p>
<p>If you have a Alienware laptop / computer that is not yet supported and you are willing to help me developing the support for it, please contact me, and I will built in the support for your model.</p>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=14</wfw:commentRss>
		</item>
		<item>
		<title>Easyhook tipps and tricks</title>
		<link>http://3d.benjamin-thaut.de/?p=13</link>
		<comments>http://3d.benjamin-thaut.de/?p=13#comments</comments>
		<pubDate>Sat, 26 Sep 2009 15:58:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[easyhook]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=13</guid>
		<description><![CDATA[I wanted to hook the WinApi funktion CreateFile, CloseHandle, ReadFile and WriteFile to decode a device protocol. So I searched for a hooking library in the internet. Unfortunately the only good one for c++ was detour from Mircrosoft which was free only for x86 non comercial use. As my laptop runs with a x64 Windows [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to hook the WinApi funktion CreateFile, CloseHandle, ReadFile and WriteFile to decode a device protocol. So I searched for a hooking library in the internet. Unfortunately the only good one for c++ was detour from Mircrosoft which was free only for x86 non comercial use. As my laptop runs with a x64 Windows Vista this was no option for me. So I found easyhook, a c# hooking library. It was quite easy to achive the first success with it, but then I had a few small problems for which I want to describe the solutions here.<br />
<span id="more-13"></span></p>
<p>Lets asume you want to hook a function which easy hook which executes some hooking code before and after the original call:</p>
<pre class="c">&nbsp;
<span style="color: #66cc66;">&#91;</span>UnmanagedFunctionPointer<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
delegate bool DSomeFunc<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#91;</span>DllImport<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;somedll.dll&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #993333;">static</span> bool SomeFunc<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #993333;">static</span> bool SomeFunc_Hooked<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
  some code before original call
&nbsp;
  bool ret = SomeFunc<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span>;
&nbsp;
  some code after original call
  <span style="color: #b1b100;">return</span> ret;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>You will notice that the code after the original call never gets executed. This is because the DllImport gives you the already hooked function. So you are calling the hooked function from the hooked function. This is prevented by the easyhook lib, by returning the flow to the calling program. (which is a very good thing, because it would lead to a infinite loop)<br />
To avoid this behaviour you have to get the unhooked function from the easyhook library.</p>
<pre class="c">&nbsp;
<span style="color: #66cc66;">&#91;</span>UnmanagedFunctionPointer<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
delegate bool DSomeFunc<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span>;
&nbsp;
private DSomeFunc SomeFuncPtr;
&nbsp;
<span style="color: #993333;">static</span> bool SomeFunc_Hooked<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
  some code before original call
&nbsp;
  bool ret = SomeFuncPtr<span style="color: #66cc66;">&#40;</span>...<span style="color: #66cc66;">&#41;</span>;
&nbsp;
  some code after original call
  <span style="color: #b1b100;">return</span> ret;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>And in the run method of your injected dll right after installing the hooks.</p>
<pre class="c">&nbsp;
...
<span style="color: #202020;">SomeFuncPtr</span> = LocalHook.<span style="color: #202020;">GetProcDelegate</span>&lt;DSomeFunc&gt;<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;somedll.dll&quot;</span>, <span style="color: #ff0000;">&quot;SomeFunc&quot;</span><span style="color: #66cc66;">&#41;</span>;
...
&nbsp;</pre>
<p>Now your code after the original api call gets executed!</p>
<p>The second problem I encounterd was on hooking WriteFile:</p>
<pre class="c">&nbsp;
        <span style="color: #66cc66;">&#91;</span>UnmanagedFunctionPointer<span style="color: #66cc66;">&#40;</span>CallingConvention.<span style="color: #202020;">StdCall</span>,
            CharSet = CharSet.<span style="color: #993333;">Auto</span>,
            SetLastError = <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
        delegate bool DWriteFile<span style="color: #66cc66;">&#40;</span>
            IntPtr hFile,
            byte<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> lpBuffer,
            uint nNumberOfBytesToWrite,
            out uint lpNumberOfBytesWritten,
            <span style="color: #66cc66;">&#91;</span>In<span style="color: #66cc66;">&#93;</span> IntPtr lpOverlapped<span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #66cc66;">&#91;</span>DllImport<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;kernel32.dll&quot;</span>,
            CharSet = CharSet.<span style="color: #993333;">Auto</span>,
            SetLastError = <span style="color: #000000; font-weight: bold;">true</span>,
            CallingConvention = CallingConvention.<span style="color: #202020;">StdCall</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
        <span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">extern</span> bool WriteFile<span style="color: #66cc66;">&#40;</span>
            IntPtr hFile,
            byte<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> lpBuffer,
            uint nNumberOfBytesToWrite,
            out uint lpNumberOfBytesWritten,
            <span style="color: #66cc66;">&#91;</span>In<span style="color: #66cc66;">&#93;</span> IntPtr lpOverlapped<span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #993333;">static</span> bool WriteFile_Hooked<span style="color: #66cc66;">&#40;</span>
            IntPtr hFile,
            byte<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> lpBuffer,
            uint nNumberOfBytesToWrite,
            out uint lpNumberOfBytesWritten,
            <span style="color: #66cc66;">&#91;</span>In<span style="color: #66cc66;">&#93;</span> IntPtr lpOverlapped<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>uint i=<span style="color: #cc66cc;">0</span>;i&lt;nNumberOfBytesToWrite;i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
	      do_something_with<span style="color: #66cc66;">&#40;</span>lpBuffer<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	    <span style="color: #66cc66;">&#125;</span>
            <span style="color: #b1b100;">return</span> WriteFile<span style="color: #66cc66;">&#40;</span>hFile, lpBuffer, nNumberOfBytesToWrite, out lpNumberOfBytesWritten, lpOverlapped<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>On every WriteFile call I got a exception in the loop for i=1, because if the call comes from a unmanaged app the byte array has no size and therefore the size 1 is assumed.<br />
To fix the problem one has to use the marshal class and change all the byte arrays to pointers.</p>
<pre class="c">&nbsp;
        <span style="color: #66cc66;">&#91;</span>UnmanagedFunctionPointer<span style="color: #66cc66;">&#40;</span>CallingConvention.<span style="color: #202020;">StdCall</span>,
            CharSet = CharSet.<span style="color: #993333;">Auto</span>,
            SetLastError = <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
        delegate bool DWriteFile<span style="color: #66cc66;">&#40;</span>
            IntPtr hFile,
            IntPtr lpBuffer, <span style="color: #808080; font-style: italic;">//changed</span>
            uint nNumberOfBytesToWrite,
            out uint lpNumberOfBytesWritten,
            <span style="color: #66cc66;">&#91;</span>In<span style="color: #66cc66;">&#93;</span> IntPtr lpOverlapped<span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #66cc66;">&#91;</span>DllImport<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;kernel32.dll&quot;</span>,
            CharSet = CharSet.<span style="color: #993333;">Auto</span>,
            SetLastError = <span style="color: #000000; font-weight: bold;">true</span>,
            CallingConvention = CallingConvention.<span style="color: #202020;">StdCall</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
        <span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">extern</span> bool WriteFile<span style="color: #66cc66;">&#40;</span>
            IntPtr hFile,
            byte<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> lpBuffer, <span style="color: #808080; font-style: italic;">//no need to change here because we are calling that</span>
            uint nNumberOfBytesToWrite,
            out uint lpNumberOfBytesWritten,
            <span style="color: #66cc66;">&#91;</span>In<span style="color: #66cc66;">&#93;</span> IntPtr lpOverlapped<span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #993333;">static</span> bool WriteFile_Hooked<span style="color: #66cc66;">&#40;</span>
            IntPtr hFile,
            IntPtr lpBuffer, <span style="color: #808080; font-style: italic;">//changed</span>
            uint nNumberOfBytesToWrite,
            out uint lpNumberOfBytesWritten,
            <span style="color: #66cc66;">&#91;</span>In<span style="color: #66cc66;">&#93;</span> IntPtr lpOverlapped<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
            byte<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> bytes = new byte<span style="color: #66cc66;">&#91;</span>nNumberOfBytesToWrite<span style="color: #66cc66;">&#93;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>uint i = <span style="color: #cc66cc;">0</span>; i &lt; nNumberOfBytesToWrite; i++<span style="color: #66cc66;">&#41;</span>
                bytes<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = Marshal.<span style="color: #202020;">ReadByte</span><span style="color: #66cc66;">&#40;</span>lpBuffer, <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span>i<span style="color: #66cc66;">&#41;</span>;
&nbsp;
            <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>uint i=<span style="color: #cc66cc;">0</span>;i&lt;nNumberOfBytesToWrite;i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
	      do_something_with<span style="color: #66cc66;">&#40;</span>bytes<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	    <span style="color: #66cc66;">&#125;</span>
            <span style="color: #b1b100;">return</span> WriteFile<span style="color: #66cc66;">&#40;</span>hFile, bytes, nNumberOfBytesToWrite, out lpNumberOfBytesWritten, lpOverlapped<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>Now the hook works. The same works for hooking ReadFile but after calling the original function (also use tipp 1!)</p>
<p>For hooking I simply changed the FileMonInject example the source can be downloaded here:<br />
<a href="http://3d.benjamin-thaut.de/Files/FileMonInject.zip">C# Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=13</wfw:commentRss>
		</item>
		<item>
		<title>Keys per minute plugin for pidgin</title>
		<link>http://3d.benjamin-thaut.de/?p=12</link>
		<comments>http://3d.benjamin-thaut.de/?p=12#comments</comments>
		<pubDate>Sat, 26 Sep 2009 15:34:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[pidgin plugins]]></category>

		<category><![CDATA[pidgin plugin]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=12</guid>
		<description><![CDATA[Some time ago I've created a plugin for pidgin which counts the keystrokes per minute while you are typing a message and displays the value. It also creates a small statistic over it.
Source (Linux &#38; Windows) + Binaries (Windows only): keysperminute.zip
]]></description>
			<content:encoded><![CDATA[<p>Some time ago I've created a plugin for pidgin which counts the keystrokes per minute while you are typing a message and displays the value. It also creates a small statistic over it.</p>
<p>Source (Linux &amp; Windows) + Binaries (Windows only): <a href="http://3d.benjamin-thaut.de/Files/file.php?name=keysperminute.zip">keysperminute.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=12</wfw:commentRss>
		</item>
		<item>
		<title>Pidgin AlienFX-Notification Plugin</title>
		<link>http://3d.benjamin-thaut.de/?p=11</link>
		<comments>http://3d.benjamin-thaut.de/?p=11#comments</comments>
		<pubDate>Sat, 26 Sep 2009 15:31:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[alienfx]]></category>

		<category><![CDATA[pidgin plugins]]></category>

		<category><![CDATA[pidgin plugin]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=11</guid>
		<description><![CDATA[I just finished my AlienFX-Notfication plugin for pidgin. It notifies the user of a new message by using the leds provided by an alienfx device.
Currently only the version for the Alienware Mx15x Laptop model is aviable as I lack the information for the other laptops and pc's.
Update: I managed to fix the bug which sometimes [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished my AlienFX-Notfication plugin for pidgin. It notifies the user of a new message by using the leds provided by an alienfx device.</p>
<p>Currently only the version for the Alienware Mx15x Laptop model is aviable as I lack the information for the other laptops and pc's.</p>
<p>Update: I managed to fix the bug which sometimes caused the AlienFX-Device to crash.</p>
<p>Download: <span id="more-11"></span></p>
<p>Mx15 Version (Source &amp; Binaries currently Windows only): <a href="http://3d.benjamin-thaut.de/Files/file.php?name=alienfx-notification-mx15-edition.zip">alienfx-notification-mx15-edition.zip</a></p>
<p>Missing the version for your Alienware Laptop / PC? Help me creating it by executing a small program of mine which is collecting information about your alienfx device. After completion of this program you should please send me back the "results.log" file. The program does nothing evil. It simply tests all posible leds connected to a alienfx device and asks you if something has changed and what. The e-mail address to send it back to me is stated at the end of the program. You can download it here.<br />
<a href="http://stuff.benjamin-thaut.de/alienfx-leds-tester.zip">alienfx-leds-tester.zip</a></p>
<p>The warning at the begin of the program is just that I get no troubles with the law in the case that something goes wrong.<br />
If your alienfx device stops working while or after using the program you need to restart your pc to fix this.</p>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=11</wfw:commentRss>
		</item>
		<item>
		<title>Mandelbrot Explorer</title>
		<link>http://3d.benjamin-thaut.de/?p=10</link>
		<comments>http://3d.benjamin-thaut.de/?p=10#comments</comments>
		<pubDate>Mon, 11 May 2009 09:50:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[OpenGL Demos]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=10</guid>
		<description><![CDATA[
As a futher test of the engine I'm currently developing with a friend I wrote this mandelbrot explorer. I've implemented software double support inside the mandelbrot shader to avoid the early percission loss. Unfortunately I had to notice that the percission loss is due to the lack of percission during passing the arguments to the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://3d.benjamin-thaut.de/Bilder/mandelbrot_klein.jpg" alt="" width="640" height="480" /></p>
<p>As a futher test of the engine I'm currently developing with a friend I wrote this mandelbrot explorer. I've implemented software double support inside the mandelbrot shader to avoid the early percission loss. Unfortunately I had to notice that the percission loss is due to the lack of percission during passing the arguments to the shader. Because I had yet no time to also implement pseudo doubles on the cpu, it's currently disabled.</p>
<p>You can download the application at: <a href="http://3d.benjamin-thaut.de/Files/mandelbrot.zip">http://3d.benjamin-thaut.de/Files/mandelbrot.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=10</wfw:commentRss>
		</item>
		<item>
		<title>NE.S.W.A.K.TE.K.</title>
		<link>http://3d.benjamin-thaut.de/?p=9</link>
		<comments>http://3d.benjamin-thaut.de/?p=9#comments</comments>
		<pubDate>Sun, 12 Apr 2009 11:28:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[OpenGL Demos]]></category>

		<category><![CDATA[game]]></category>

		<category><![CDATA[OpenGL]]></category>

		<category><![CDATA[tetris]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=9</guid>
		<description><![CDATA[
Currently im creating a game Engine together with a friend for learning porpuses and fun. Because I read the article "Write games not engines" I decided to write a small tetris game with our engine to test the mechanics. During this process I found many flaws and bugs in the engine and fixed them. Also [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://3d.benjamin-thaut.de/Bilder/neswaktek.jpg" alt="" width="640" height="480" /><img src="http://3d.benjamin-thaut.de/wp-admin/http/3d.benjamin-thaut.de/Bilder/neswaktek.jpg" alt="" /></p>
<p>Currently im creating a game Engine together with a friend for learning porpuses and fun. Because I read the article "Write games not engines" I decided to write a small tetris game with our engine to test the mechanics. During this process I found many flaws and bugs in the engine and fixed them. Also I had lots of ideas how to improve our engine.</p>
<p>The whole game logic is written in lua. Also all draw calls are made by lua. The engine collects the draw calls and executes them later. The engine setup is also done by lua. So the engine is not restricted to forward rendering or deferrend rendering. For this game deferrend rendering was used for learning porpuses. Also I implemented 2 post processing shaders. A edge detection shader and a glow shader. The input is also managed by lua, so it was very easy to write a configurable input system. Even axis of controlers can be used for binary key events because I wrote a small converter in lua.<br />
For small games it is planed to do the logic and draw calls completely in lua. If we some day plan on doing a bigger game like an ego shooter or something like that, more of the logic moves into the C++ code to maintain good speed.</p>
<p>The shaders are generated out of xml files with the option to embed lua code into the xml file, to be able to generate many diferrend shaders out of the same file. In this game this feature was used for the differend qualities of the outline shader.</p>
<p>A huge effort was also taken to use multi threading in the engine. I wrote a task manager that collects all the taks and executes them in the right order, depending on their dependencies to other tasks. To use mutli threading in lua, we wrote data synchronzing commands for lua. Because the multi threading code just went usable recently, this game still runs single threaded because it's developement startet earlier before.</p>
<p>All displayed strings are indentified by a string name and saved in extern files so this game can be easly puplished in different languages. Currently the game comes with the fowolling languages: german, english and russian.</p>
<p>I know that in this game many things could be solved better, but it was never the aim to go for perfection. Instead this game was only developed to test and improve the engine, to learn lua and for fun.</p>
<p>You can download the game at: <a href="http://stuff.benjamin-thaut.de/neswaktek.zip">http://stuff.benjamin-thaut.de/neswaktek.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=9</wfw:commentRss>
		</item>
		<item>
		<title>GPU Particle System Demo</title>
		<link>http://3d.benjamin-thaut.de/?p=8</link>
		<comments>http://3d.benjamin-thaut.de/?p=8#comments</comments>
		<pubDate>Tue, 10 Jun 2008 14:50:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[OpenGL Demos]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=8</guid>
		<description><![CDATA[
I've read the paper "cascade demo secretes" by Nvidia and wanted to implement a particle system entirely on the gpu myself. So I wrote this small demo. Basicly it works like this:

Vertexbuffer1 is rendered.
the geometry shader processes the information (recomputes particle positions, speeds, etc.)
the result is written into vertexbuffer2 by transform feedback
vertexbuffer2 is drawn
the geometry [...]]]></description>
			<content:encoded><![CDATA[<p><img style="vertical-align: middle;" src="http://3d.benjamin-thaut.de/Bilder/gpuparticlesystem.jpg" alt="" width="495" height="499" /></p>
<p>I've read the paper "cascade demo secretes" by Nvidia and wanted to implement a particle system entirely on the gpu myself. So I wrote this small demo. Basicly it works like this:</p>
<ul>
<li>Vertexbuffer1 is rendered.</li>
<li>the geometry shader processes the information (recomputes particle positions, speeds, etc.)</li>
<li>the result is written into vertexbuffer2 by transform feedback</li>
<li>vertexbuffer2 is drawn</li>
<li>the geometry shader creates out of a point a billboard with 4 vertices</li>
<li>fragment shader renders the billboard with the texture on it</li>
<li>vertexbuffer1 and vertexbuffer2 are swaped</li>
</ul>
<p><strong>Needed Extensions:</strong></p>
<ul>
<li>EXT_gpu_shader4</li>
<li>NV_transform_feedback</li>
<li>EXT_geometry_shader</li>
</ul>
<p><strong>Download:</strong></p>
<ul>
<li><a href="http://3d.benjamin-thaut.de/Files/GPU-Partikel-System-Bin.zip">Binaries (Windows)</a></li>
<li><a href="http://3d.benjamin-thaut.de/Files/GPU-Partikel-System.zip">Source (Windows / Linux)</a></li>
</ul>
<p><strong>Youtube Video:</strong></p>
<ul>
<li><a href="http://www.youtube.com/watch?v=uwUBkEH8fgk">Click here to watch</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=8</wfw:commentRss>
		</item>
		<item>
		<title>OpenGL Wald Demo</title>
		<link>http://3d.benjamin-thaut.de/?p=7</link>
		<comments>http://3d.benjamin-thaut.de/?p=7#comments</comments>
		<pubDate>Thu, 29 May 2008 09:34:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[OpenGL Demos]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=7</guid>
		<description><![CDATA[
I wrote this small demo in the past year or so, don't really know any more when I started.
During this time I developed my OpenGL and C++ Skills and rewrote certain parts of my small
framwork countless Times. Finally I want to start on my first game, so I declare this demo
as finished. I know there [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://stuff.benjamin-thaut.de/opengl/wald-screen.jpg"><img src="http://3d.benjamin-thaut.de/Bilder/wald.jpg" alt="" width="640" height="400" /></a></p>
<p>I wrote this small demo in the past year or so, don't really know any more when I started.<br />
During this time I developed my OpenGL and C++ Skills and rewrote certain parts of my small<br />
framwork countless Times. Finally I want to start on my first game, so I declare this demo<br />
as finished. I know there would be still much to do and to improve but I simply don't want<br />
to develop on this demo any more.</p>
<p>Currently it features<br />
- XML shader system (from shader 2.0 to 4.0. System is captable of using geometry shaders but<br />
I didn't use it in this demo)<br />
- real time shadows (I used a method to improve the quality of the shadows which was developed<br />
by Thomas "Schrompf" Schulze - www.dreamworlds.de)<br />
- Small GUI (used for the value and camera editors)<br />
- value and camera editor (for easily chaning parts of the demo)<br />
- terrain rendering with smooth blending between two detail levels<br />
- Water with "correct" reflections<br />
- some sort of pseudo instancing for the gras. Uses new draw_instanced extension if aviable<br />
- Frustrum culling an lots of other standard stuff</p>
<p><strong>Needed Extensions:</strong></p>
<ul>
<li>completely OpenGL 2.0</li>
</ul>
<p><strong>Download:</strong></p>
<ul>
<li><a href="http://stuff.benjamin-thaut.de/opengl/Wald.7z">Binaries (Windows)</a></li>
<li><a href="http://stuff.benjamin-thaut.de/opengl/Wald-src.7z">Source (Windows / Linux)</a></li>
</ul>
<p><strong>Youtube Video:</strong></p>
<ul>
<li><a href="http://www.youtube.com/watch?v=KtzTL3y4RTA">Clicke here to watch</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=7</wfw:commentRss>
		</item>
		<item>
		<title>Edge Detection Filter (GLSL)</title>
		<link>http://3d.benjamin-thaut.de/?p=6</link>
		<comments>http://3d.benjamin-thaut.de/?p=6#comments</comments>
		<pubDate>Thu, 29 May 2008 08:31:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[RenderMonkey Shaders]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=6</guid>
		<description><![CDATA[
Lately disscussed with a friend about penumbra shadows. I found a paper about this theme which used a edge detection filter to achive penumbra shadows, so I wrote a edge-detection filter in rendermonkey. Basically it looks if the difference between 5 pixels, which are ordered in a cross, are to high, then it is a [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border: 1px solid black; margin: 5px;" src="http://3d.benjamin-thaut.de/Bilder/edge.jpg" alt="" width="545" height="459" /></p>
<p>Lately disscussed with a friend about penumbra shadows. I found a paper about this theme which used a edge detection filter to achive penumbra shadows, so I wrote a edge-detection filter in rendermonkey. Basically it looks if the difference between 5 pixels, which are ordered in a cross, are to high, then it is a edge pixel.</p>
<p><strong>Needed Extensions:</strong></p>
<ul>
<li>none</li>
</ul>
<p><strong>Download:</strong></p>
<p><a href="http://3d.benjamin-thaut.de/Files/edge-filter.rfx">edge-filter.rfx (RenderMonkey 1.80)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=6</wfw:commentRss>
		</item>
		<item>
		<title>3 way mapping (GLSL)</title>
		<link>http://3d.benjamin-thaut.de/?p=5</link>
		<comments>http://3d.benjamin-thaut.de/?p=5#comments</comments>
		<pubDate>Thu, 29 May 2008 07:32:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[RenderMonkey Shaders]]></category>

		<guid isPermaLink="false">http://3d.benjamin-thaut.de/?p=5</guid>
		<description><![CDATA[If you generate some data with the GPU or CPU, for example with the marching cubes algorithm, you don't have texturecoordinates to texture the generated mesh. To solve this problem I wrote a 3 way mapping shader, which generates texturecoordinates, binormals and tangents only out of the vertex position and vertex normal. This technique was [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="float: right; border: 1px solid black;" src="http://3d.benjamin-thaut.de/Bilder/3way.jpg" alt="" width="402" height="308" />If you generate some data with the GPU or CPU, for example with the marching cubes algorithm, you don't have texturecoordinates to texture the generated mesh. To solve this problem I wrote a 3 way mapping shader, which generates texturecoordinates, binormals and tangents only out of the vertex position and vertex normal. This technique was also presented in Nvidia's "Cascades Demo Secrets" paper. To test the mapping I applied my parallax occlusion mapping shader.</p>
<p><strong>Needed Extensions:</strong></p>
<ul>
<li>EXT_gpu_shader4 - only because of parallax occlusion mapping</li>
</ul>
<p><strong>Download:</strong></p>
<p><a href="http://3d.benjamin-thaut.de/Files/3way-mapping.rfx">3way-mappping.rfx (RenderMonkey 1.80)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://3d.benjamin-thaut.de/?feed=rss2&amp;p=5</wfw:commentRss>
		</item>
	</channel>
</rss>
