<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[GMan's Mods & Stuff — Bug in smgr.getMeshFromFileIO ?]]></title>
		<link>https://gprogs.com/viewtopic.php?id=396</link>
		<atom:link href="https://gprogs.com/extern.php?action=feed&amp;tid=396&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Bug in smgr.getMeshFromFileIO ?.]]></description>
		<lastBuildDate>Tue, 29 Dec 2009 04:15:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Bug in smgr.getMeshFromFileIO ?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1511#p1511</link>
			<description><![CDATA[<p>greetings porcus!&nbsp; its been a while i hope all is well <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; thank you very much for the detailed bug report and especially the compilable code.&nbsp; it really helps when troubleshooting issues.&nbsp; you were correct in there was an issue with the getMeshFromFileIO method.&nbsp; whenever a C++ object is wrapped, by the Irrlicht mod i must be sure to say whether it needs dropped or not.&nbsp; essentially, any method that starts with &quot;create&quot; i must be sure to tell the wrapping BMAX type to decrement the internal reference counter when dropped.&nbsp; anything that starts with &quot;add&quot; or &quot;get&quot; i must tell it to not decrement the counter.&nbsp; in this instance i incorrectly told it to decrement when it should not, causing the exception.&nbsp; a new version of the mod has been uploaded with the appropriate fix.&nbsp; you may download it by visiting the v1.6 announcements forum entry.</p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Tue, 29 Dec 2009 04:15:19 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1511#p1511</guid>
		</item>
		<item>
			<title><![CDATA[Bug in smgr.getMeshFromFileIO ?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1510#p1510</link>
			<description><![CDATA[<div class="codebox"><pre><code>Incbin &quot;cone.b3d&quot;
Incbin &quot;cube.b3d&quot;
Incbin &quot;cylinder.b3d&quot;
Incbin &quot;pyramid.b3d&quot;
Incbin &quot;sphere.b3d&quot;
Incbin &quot;plane.b3d&quot;

Function CreatePlane:ianimatedmeshscenenode()
Local mtmp:ireadfile=device.getfilesystem().creatememoryreadfile(IncbinPtr(&quot;plane.b3d&quot;),IncbinLen(&quot;plane.b3d&quot;),&quot;Plane.b3d&quot;,False)
Local mtmpb:ianimatedmeshscenenode=smgr.addanimatedmeshscenenode(smgr.getMeshFromFileIO(mtmp))
mtmpb.setmaterialflag(emf_lighting,False)
mtmp.drop()
Return mtmpb
End Function

Function CreateCone:ianimatedmeshscenenode()
Local mtmp:ireadfile=device.getfilesystem().creatememoryreadfile(IncbinPtr(&quot;cone.b3d&quot;),IncbinLen(&quot;cone.b3d&quot;),&quot;Cone.b3d&quot;,False)
Local mtmpb:ianimatedmeshscenenode=smgr.addanimatedmeshscenenode(smgr.getMeshFromFileIO(mtmp))
mtmpb.setmaterialflag(emf_lighting,False)
mtmp.drop()
Return mtmpb
End Function

Function CreateCube:ianimatedmeshscenenode()
Local mtmp:ireadfile=device.getfilesystem().creatememoryreadfile(IncbinPtr(&quot;cube.b3d&quot;),IncbinLen(&quot;cube.b3d&quot;),&quot;Cube.b3d&quot;,False)
Local mtmpb:ianimatedmeshscenenode=smgr.addanimatedmeshscenenode(smgr.getMeshFromFileIO(mtmp))
mtmpb.setmaterialflag(emf_lighting,False)
mtmp.drop()
Return mtmpb
End Function

Function CreateCylinder:ianimatedmeshscenenode()
Local mtmp:ireadfile=device.getfilesystem().creatememoryreadfile(IncbinPtr(&quot;cylinder.b3d&quot;),IncbinLen(&quot;cylinder.b3d&quot;),&quot;Cylinder.b3d&quot;,False)
Local mtmpb:ianimatedmeshscenenode=smgr.addanimatedmeshscenenode(smgr.getMeshFromFileIO(mtmp))
mtmpb.setmaterialflag(emf_lighting,False)
mtmp.drop()
Return mtmpb
End Function

Function CreatePyramid:ianimatedmeshscenenode()
Local mtmp:ireadfile=device.getfilesystem().creatememoryreadfile(IncbinPtr(&quot;pyramid.b3d&quot;),IncbinLen(&quot;pyramid.b3d&quot;),&quot;Pyramid.b3d&quot;,False)
Local mtmpb:ianimatedmeshscenenode=smgr.addanimatedmeshscenenode(smgr.getMeshFromFileIO(mtmp))
mtmpb.setmaterialflag(emf_lighting,False)
mtmp.drop()
Return mtmpb
End Function

Function CreateSphere:ianimatedmeshscenenode()
Local mtmp:ireadfile=device.getfilesystem().creatememoryreadfile(IncbinPtr(&quot;sphere.b3d&quot;),IncbinLen(&quot;sphere.b3d&quot;),&quot;Sphere.b3d&quot;,False)
Local mtmpb:ianimatedmeshscenenode=smgr.addanimatedmeshscenenode(smgr.getMeshFromFileIO(mtmp))
mtmpb.setmaterialflag(emf_lighting,False)
mtmp.drop()
Return mtmpb
End Function</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (porcus)]]></author>
			<pubDate>Mon, 28 Dec 2009 20:45:31 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1510#p1510</guid>
		</item>
	</channel>
</rss>
