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