Thanks for the info, I&#39;ll look into it. :)<br><br><div class="gmail_quote">On Sun, Jun 6, 2010 at 8:54 AM, Konrad Wilhelm Kleine <span dir="ltr">&lt;<a href="mailto:konrad@konradwilhelm.de">konrad@konradwilhelm.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hey Mitchell,<br>
<br>
You did some great work here!<br>
<br>
I recently did some experiments with GLSL and was very confused when it<br>
comes to passing textures to my shaders. To clarify: If you support<br>
&quot;int&quot; or &quot;uint&quot; (don&#39;t know which one it is), you already have support<br>
to pass textures as &quot;sampler2D&quot;.<br>
<br>
These are the steps:<br>
<br>
0) Set &quot;i&quot; to 0<br>
1) Get uniform location of your sampler2D (this isn&#39;t the textureID NOR<br>
the texture unit)<br>
2) Set your uniform using &quot;glUniformXY(location, i);&quot;<br>
3) Activate your texture using &quot;glActiveTexture(GL_TEXTURE0 + i);&quot;<br>
4) Bind your texture using &quot;glBindTexture(GL_TEXTURE_2D, textureID);&quot;<br>
5) Increment i<br>
6) Repeat steps 1) to 5) for every texture you have<br>
<br>
This website helped me a lot:<br>
<a href="http://www.opengl.org/wiki/GLSL_:_common_mistakes#Binding_A_Texture" target="_blank">http://www.opengl.org/wiki/GLSL_:_common_mistakes#Binding_A_Texture</a><br>
<br>
Cheers,<br>
kwk<br>
<br>
Am 05.06.2010 02:37, schrieb Mitchell Stokes:<br>
<div><div></div><div class="h5">&gt; Here is my report for week 2:<br>
&gt;<br>
&gt; <a href="http://mogurijin.wordpress.com/2010/06/04/gsoc-status-report-week-2/" target="_blank">http://mogurijin.wordpress.com/2010/06/04/gsoc-status-report-week-2/</a><br>
&gt;<br>
&gt; Cheers,<br>
&gt; Mitchell Stokes (Moguri)<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; Soc-2010-dev mailing list<br>
&gt; <a href="mailto:Soc-2010-dev@blender.org">Soc-2010-dev@blender.org</a><br>
&gt; <a href="http://lists.blender.org/mailman/listinfo/soc-2010-dev" target="_blank">http://lists.blender.org/mailman/listinfo/soc-2010-dev</a><br>
_______________________________________________<br>
Soc-2010-dev mailing list<br>
<a href="mailto:Soc-2010-dev@blender.org">Soc-2010-dev@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/soc-2010-dev" target="_blank">http://lists.blender.org/mailman/listinfo/soc-2010-dev</a><br>
</div></div></blockquote></div><br>