Should be fixed in CVS now.&nbsp; Thanks for catching that.<br><br><div><span class="gmail_quote">On 7/13/07, <b class="gmail_sendername">cyrille henry</b> &lt;<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">hello,<br>i noticed that only the 1st texture can be change. this is due to a typo line 170 in glsl_program.cpp.
<br><br>this line :<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;glUniform1i(m_loc[1], (GLint)m_param[i][0]);<br><br>should be change to this :<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;glUniform1i(m_loc[i], (GLint)m_param[i][0]);<br><br>now, it work ok here.<br><br>cyrille<br><br>
<br><br>chris clepper a écrit :<br>&gt; CVS is updated.&nbsp;&nbsp;Hopefully this won&#39;t break anyone&#39;s compiles.<br>&gt;<br>&gt; The attached files are a test patch and the shaders.&nbsp;&nbsp;I will be out of<br>&gt; town for a few days and not able to work on this again until next
<br>&gt; week.<br>&gt;<br>&gt; On 7/12/07, chris clepper &lt;<a href="mailto:cgclepper@gmail.com">cgclepper@gmail.com</a>&gt; wrote:<br>&gt;&gt; I have multitexturing working with GLSL.&nbsp;&nbsp;While I upload the changes<br>&gt;&gt; to CVS I can explain how it works.
<br>&gt;&gt;<br>&gt;&gt; GLSL shaders cannot directly talk to hardware like ARB ones can.&nbsp;&nbsp;The<br>&gt;&gt; application side code has to tell the shader which hardware texture<br>&gt;&gt; unit to use.&nbsp;&nbsp;Obviously when I compile GEM there is no way in hell to
<br>&gt;&gt; know what the shader variables are going to be named, so another<br>&gt;&gt; method to tell the shader which unit to use needs to be in place.<br>&gt;&gt;<br>&gt;&gt; One solution is to hardcode the names of the sampler variables, but
<br>&gt;&gt; that is kind of a hack.&nbsp;&nbsp;The one I put in place uses a message to the<br>&gt;&gt; glsl_program object with the name of the sampler and the texture unit<br>&gt;&gt; to use.<br>&gt;&gt;<br>&gt;&gt; How to use:<br>
&gt;&gt;<br>&gt;&gt; 1) create gemwin and turn on rendering<br>&gt;&gt; 2) load shader<br>&gt;&gt; 3) send a [mySamplerName $1( message to glsl_program<br>&gt;&gt; 4) load two movies or images<br>&gt;&gt; 5) set one of the pix_texture units to upload to the same texture unit
<br>&gt;&gt; you told the shader to use with a [texunit $1( message<br>&gt;&gt;<br>&gt;&gt; This change should be in CVS soon.&nbsp;&nbsp;I will post an example patch in a<br>&gt;&gt; bit.<br>&gt;<br>&gt;&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------
<br>&gt;<br>&gt; _______________________________________________<br>&gt; <a href="mailto:PD-list@iem.at">PD-list@iem.at</a> mailing list<br>&gt; UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list">
http://lists.puredata.info/listinfo/pd-list</a><br></blockquote></div><br>