<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Drawing in Orthographic mode]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=436</link>
		<description><![CDATA[The most recent posts in Drawing in Orthographic mode.]]></description>
		<lastBuildDate>Mon, 10 Sep 2012 15:00:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2563#p2563</link>
			<description><![CDATA[<p>I had a quick look at MOText, I just used the atlas system because I knew I could get it working quickly. I think I might get it to fallback on MOText, if I have time, I don&#039;t know.</p><p>There&#039;s a lot of GUI-ish things that still need to be done, like animations... but for now I think, with the exception of keyboard and mouse input, I&#039;m almost done with GUI features.</p>]]></description>
			<author><![CDATA[dummy@example.com (Nistur)]]></author>
			<pubDate>Mon, 10 Sep 2012 15:00:43 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2563#p2563</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2561#p2561</link>
			<description><![CDATA[<p>Very nice <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>For the text you can also use MOText manually I think, but there might be a little trick for drawing it if it&#039;s not in a scene (not sure).</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Mon, 10 Sep 2012 14:46:01 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2561#p2561</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2560#p2560</link>
			<description><![CDATA[<p>I will probably end up using it for that too, yep <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> To begin with (because the design is far simpler than complex game GUI) it&#039;s for the tools stuff I&#039;m doing, but I am trying to write it in a way that&#039;s easy to reuse for ingame stuff.</p><p>All of the layout and logic is actually a collection of lua classes, there&#039;s very little actually implemented in C++ right now (the atlasing system and RendererDrawQuad is really all it is)</p><p>Over lunch, I reused the atlas system to do bitmap font rendering using the same setup. I should be able to do any dialogue box with 2 draw calls with no optimisations, if it ends up being slow (really shouldn&#039;t) then I could probably make it ~2 draw calls for the whole GUI.</p>]]></description>
			<author><![CDATA[dummy@example.com (Nistur)]]></author>
			<pubDate>Mon, 10 Sep 2012 14:40:39 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2560#p2560</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2559#p2559</link>
			<description><![CDATA[<p>Looks nice <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Are you doing an in-game GUI system ?</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Mon, 10 Sep 2012 14:32:24 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2559#p2559</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2554#p2554</link>
			<description><![CDATA[<p>It worked great. I had a little problem with my atlas implementation to get it to display properly, but tadaa! Now I can go on and make more GUI stuff <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /><br /><span class="postimg"><img src="http://img41.imageshack.us/img41/6936/boxgx.png" alt="http://img41.imageshack.us/img41/6936/boxgx.png" /></span></p><p><em>Yes, I know that the top left image is 1px larger than the rest, I will sort that</em></p>]]></description>
			<author><![CDATA[dummy@example.com (Nistur)]]></author>
			<pubDate>Mon, 10 Sep 2012 12:30:22 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2554#p2554</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2529#p2529</link>
			<description><![CDATA[<p>Thank you, that worked great. Here&#039;s the beginning of a &quot;dialogue box&quot;, this one is particularly smiley. And the stretching in this case is on purpose. Now to hunt for textures</p><p><span class="postimg"><img src="http://img96.imageshack.us/img96/5779/smilekg.png" alt="http://img96.imageshack.us/img96/5779/smilekg.png" /></span></p>]]></description>
			<author><![CDATA[dummy@example.com (Nistur)]]></author>
			<pubDate>Fri, 07 Sep 2012 07:49:49 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2529#p2529</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2525#p2525</link>
			<description><![CDATA[<p>If you want to draw 2d, you might also need to disable depth-test and face-culling.</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Thu, 06 Sep 2012 13:19:15 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2525#p2525</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2524#p2524</link>
			<description><![CDATA[<p>((sorry for the delay, I had to wait until my lunch break to actually test it))</p><p>No, it&#039;s actually rendering nothing at all now <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> But I&#039;m quite happy to say that it&#039;s probably some of the crazy things I&#039;d tried to get the thing displaying properly before that I haven&#039;t un-done yet. I will fiddle more tonight <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Nistur)]]></author>
			<pubDate>Thu, 06 Sep 2012 12:45:11 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2524#p2524</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2521#p2521</link>
			<description><![CDATA[<p>It&#039;s working ?</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Thu, 06 Sep 2012 08:38:42 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2521#p2521</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2520#p2520</link>
			<description><![CDATA[<p>... I&#039;m sorry... clearly my mind wasn&#039;t working well this morning.</p><p>Thanks <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Nistur)]]></author>
			<pubDate>Thu, 06 Sep 2012 08:32:14 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2520#p2520</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2519#p2519</link>
			<description><![CDATA[<p>Hi,</p><p>you have to set the viewport and the matrix, like with openGL :</p><div class="codebox"><pre><code>void set2dMode(unsigned int width, unsigned int height)
{
    MRenderingContext * render = MEngine::getInstance()-&gt;getRenderingContext();
    render-&gt;setViewport(0, 0, width, height);
    
    // set ortho projection
    render-&gt;setMatrixMode(M_MATRIX_PROJECTION);
    render-&gt;loadIdentity();
    
    render-&gt;setOrthoView(0.0f, (float)width, (float)height, 0.0f, 1.0f, -1.0f);
    
    render-&gt;setMatrixMode(M_MATRIX_MODELVIEW);
    render-&gt;loadIdentity();
}</code></pre></div><p>(used in the post process example : <a href="http://www.maratis3d.com/code/post-process/MyGame.cpp">http://www.maratis3d.com/code/post-process/MyGame.cpp</a>)</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Thu, 06 Sep 2012 08:24:53 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2519#p2519</guid>
		</item>
		<item>
			<title><![CDATA[Drawing in Orthographic mode]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2517#p2517</link>
			<description><![CDATA[<p>I&#039;m trying to do some orthographic drawing and everything&#039;s looking squashed and in the wrong place. I have no idea what I&#039;ve managed to set up incorrectly.</p><p>Oh, and another thing is that for some reason the setup that I assumed would be right, gave {0,0} at the bottom left (huh?)</p><div class="quotebox"><blockquote><p>unsigned int w, h;<br />system-&gt;getScreenSize(&amp;w, &amp;h);<br />render-&gt;setOrthoView(0, w, h, 0, 0.1, 1);</p><p>render-&gt;enableVertexArray();<br />render-&gt;enableTexCoordArray();<br />//...</p></blockquote></div><p>I did also have render-&gt;setViewport(0,0, w, h); in there to test, but it did nothing.<br />The vertices I&#039;m trying to draw are two quads from {0,0} to {200,200} and {100,100} to {300,300}.</p><p><span class="postimg"><img src="http://img26.imageshack.us/img26/3357/squashed.png" alt="http://img26.imageshack.us/img26/3357/squashed.png" /></span></p><p>Any ideas?</p>]]></description>
			<author><![CDATA[dummy@example.com (Nistur)]]></author>
			<pubDate>Thu, 06 Sep 2012 07:14:33 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2517#p2517</guid>
		</item>
	</channel>
</rss>
