<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Problem with multiple sceneLayers]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=1277</link>
		<description><![CDATA[The most recent posts in Problem with multiple sceneLayers.]]></description>
		<lastBuildDate>Tue, 14 Nov 2017 04:45:31 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Problem with multiple sceneLayers]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=8165#p8165</link>
			<description><![CDATA[<p>Thanks, it worked perfectly <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (ArielRiv)]]></author>
			<pubDate>Tue, 14 Nov 2017 04:45:31 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=8165#p8165</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem with multiple sceneLayers]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=8164#p8164</link>
			<description><![CDATA[<p>Hi,</p><p>In a c++ plugin you can customize MGame::update() and MGame::draw() to handle multiple scenes.</p><div class="codebox"><pre><code>MScene *scenes[3]
scenes[0] = getSceneByName(&quot;Sky&quot;);
scenes[1] = getSceneByName(&quot;World&quot;);
scenes[2] = getSceneByName(&quot;GUI&quot;);</code></pre></div><p>in update replace current scene update by:</p><div class="codebox"><pre><code>for (i = 0; i &lt; 3; i++) {
   scenes[i]-&gt;updateObjectsBehaviors();
   scenes[i]-&gt;update();
   if (i == 1) scenes[i]-&gt;updatePhysics();
   scenes[i]-&gt;updateObjectsMatrices();
}</code></pre></div><p>in draw something like:<br /></p><div class="codebox"><pre><code>for (i = 0; i &lt; 3; i++) {
   MOCamera * camera = scenes[i]-&gt;getCurrentCamera();

   render-&gt;setClearColor(camera-&gt;getClearColor());

   if (i == 0)
      render-&gt;clear(M_BUFFER_COLOR | M_BUFFER_DEPTH);
   else
      render-&gt;clear(M_BUFFER_DEPTH);

   camera-&gt;enable();
   if (i == 1) camera-&gt;updateListener();
   scenes[i]-&gt;draw(camera);
   scenes[i]-&gt;drawObjectsBehaviors();
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Mon, 13 Nov 2017 10:21:14 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=8164#p8164</guid>
		</item>
		<item>
			<title><![CDATA[Problem with multiple sceneLayers]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=8163#p8163</link>
			<description><![CDATA[<p>I have three scenes:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-Sky<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-World<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-GUI</p><p>I need the three scenes to be shown as layers at once in this way: World is the Sky layer and GUI is the World layer, meaning Sky is in the background, World in the middle and GUI is in front. but the engine only allows the rendering of two layers, what can I do?</p>]]></description>
			<author><![CDATA[dummy@example.com (ArielRiv)]]></author>
			<pubDate>Mon, 13 Nov 2017 02:43:27 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=8163#p8163</guid>
		</item>
	</channel>
</rss>
