<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — equilivant pack_texureBlendFunc ?]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=436&amp;type=atom" />
	<updated>2011-04-04T00:48:52Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=436</id>
		<entry>
			<title type="html"><![CDATA[equilivant pack_texureBlendFunc ?]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1657#p1657" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I&#039;m trying to get ONETEXTURE_BLEND working with sprites so i can set the alpha of scenenodes with textures that have alpha as well, I&#039;ve got the below code off the irrilich forums which is easiest enough to convert to BMax however i&#039;m not sure if the function pack_texureBlendFunc or equivilent exists in the BMax wrapper, is it missing or is the it just located somewhere else?</p><p>Thanks,</p><br /><p>::SetAlpha( f32 alpha ) <br />{ <br />&nbsp; &nbsp;// transparent? <br />&nbsp; &nbsp;if( alpha &lt; 1.0 ) <br />&nbsp; &nbsp; &nbsp; parent.GetSceneManager().registerNodeForRendering( meshSceneNode, ESNRP_TRANSPARENT ); <br />&nbsp; &nbsp;else <br />&nbsp; &nbsp; &nbsp; parent.GetSceneManager().registerNodeForRendering( meshSceneNode, ESNRP_SOLID ); <br />&nbsp; &nbsp; <br />&nbsp; &nbsp;// set the alpha <br />&nbsp; &nbsp;for( int i=0; i &lt; meshSceneNode-&gt;getMaterialCount(); i++ ) <br />&nbsp; &nbsp;{ <br />&nbsp; &nbsp; &nbsp; // get the material <br />&nbsp; &nbsp; &nbsp; video::SMaterial &amp;material = meshSceneNode-&gt;getMaterial(i); <br />&nbsp; &nbsp; &nbsp; material.MaterialType = video::EMT_ONETEXTURE_BLEND; <br />&nbsp; &nbsp; &nbsp; material.MaterialTypeParam = video::pack_texureBlendFunc( video::EBF_SRC_ALPHA, video::EBF_ONE_MINUS_SRC_ALPHA, video::EMFN_MODULATE_1X ); <br />&nbsp; &nbsp; &nbsp; material.Lighting = true; <br />&nbsp; &nbsp; &nbsp; material.ZWriteEnable = true; <br />&nbsp; &nbsp; &nbsp; material.DiffuseColor.setAlpha(alpha*255); <br />&nbsp; &nbsp;}</p>]]></content>
			<author>
				<name><![CDATA[fishy417]]></name>
				<uri>https://gprogs.com/profile.php?id=243</uri>
			</author>
			<updated>2011-04-04T00:48:52Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1657#p1657</id>
		</entry>
</feed>
