<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Renderable behaviours]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=330&amp;type=atom"/>
	<updated>2012-03-20T20:17:44Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=330</id>
		<entry>
			<title type="html"><![CDATA[Re: Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1690#p1690"/>
			<content type="html"><![CDATA[<p>Haha. I had an issue with it last night, that it didn&#039;t draw, so I gave up and went to bed. Now I took a look at it again and it was because I was trying to test it in my game scene, which had the custom MGame class to handle the post processing shader. Guess what I forgot to do...</p><p>I called MGame::draw and... well, it crashes now. That&#039;s more like what I was expecting <img src="http://forum.maratis3d.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /> I made a guess at how to translate OpenGL array calls to MRenderingContext calls. I guess I got them wrong</p><p>EDIT: removed some of the smileys, they were annoying me</p>]]></content>
			<author>
				<name><![CDATA[Nistur]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=500</uri>
			</author>
			<updated>2012-03-20T20:17:44Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1690#p1690</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1675#p1675"/>
			<content type="html"><![CDATA[<p>That&#039;s awesome! thanks <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> I Hope I&#039;ll have time to play with it now <img src="http://forum.maratis3d.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></content>
			<author>
				<name><![CDATA[Nistur]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=500</uri>
			</author>
			<updated>2012-03-19T13:00:48Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1675#p1675</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1674#p1674"/>
			<content type="html"><![CDATA[<p>It&#039;s ok, I added it on svn, that was really nothing complicated, just added a virtual function to MBehavior and a standard call to it in MGame::draw.</p><p>So there is a draw function that is called by default at the end (but the order can be changed with a custom game).<br />Just be sure to check the current renderer in case you are using shaders, if you want the behavior to be really generic.</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-03-19T12:53:29Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1674#p1674</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1673#p1673"/>
			<content type="html"><![CDATA[<p>That would be great. I don&#039;t know if I&#039;m going to have much time to work on stuff myself any time soon, so it&#039;s no rush though <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> No need at lunch time if you don&#039;t have time <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Nistur]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=500</uri>
			</author>
			<updated>2012-03-19T12:49:56Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1673#p1673</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1671#p1671"/>
			<content type="html"><![CDATA[<p>I can make a quick fix and add a draw function in MBehavior at lunch if you want.</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-03-19T11:39:38Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1671#p1671</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1670#p1670"/>
			<content type="html"><![CDATA[<p>In fact, I taught about it and there is a simple way to make it safe without coding anything,<br />the behavior can just check what is the current renderer to draw with or without shader.</p><p>What is unsafe is if a generic behavior try to draw something in 3d using shaders if the renderer is a fixed renderer (without shader).</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-03-19T11:34:38Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1670#p1670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1669#p1669"/>
			<content type="html"><![CDATA[<p>Hmmm, thanks, I&#039;m not entirely sure what I can do with that, as I&#039;m working on plugins which can&#039;t really have a game. I might try and add extra function pointers to MPlugin which can call update and draw if they&#039;re present.</p><p>I&#039;m not sure I quite understand what&#039;s unsafe, considering that it&#039;s already abstracted to MRenderingContext... but I will admit a serious lack of knowledge here, so I do believe you <img src="http://forum.maratis3d.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /> I will try and have a closer look later and see if I can think of anything <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Nistur]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=500</uri>
			</author>
			<updated>2012-03-19T10:13:56Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1669#p1669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1668#p1668"/>
			<content type="html"><![CDATA[<p>at some point I had made a draw function in behavior, but I removed it for a simple reason, there is now a renderer system in Maratis (it was not like that before), there is now a standard renderer (shaders) and a fixed renderer, so it&#039;s not completely safe to let a general draw behavior function.</p><p>I preferred leaving the choice of drawing only non-general using the MGame class, the runEvent was done to be called from MGame, for example from MGame::draw you can call beavior-&gt;runEvent with a code.</p><p>But, yes it&#039;s not completely generic. But for this quind of thing to be allowed, a solution need to be find first to know how to deal with different renderers.</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-03-19T09:45:07Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1668#p1668</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Renderable behaviours]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1662#p1662"/>
			<content type="html"><![CDATA[<p>What is the best way to be able to add renderable behaviours? I assume during update() the GL state is unlikely to be set up correctly. There is a runEvent call with parameters, but I can&#039;t find where that would be called from, so I have no idea if there would be a &quot;draw&quot; event. Ideally, a late-/post-render event would be amazing too, as I could do debug drawing in that, but I guess that&#039;s asking too much <img src="http://forum.maratis3d.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></content>
			<author>
				<name><![CDATA[Nistur]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=500</uri>
			</author>
			<updated>2012-03-18T20:47:31Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1662#p1662</id>
		</entry>
</feed>
