Thanks for the info, I'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"><<a href="mailto:konrad@konradwilhelm.de">konrad@konradwilhelm.de</a>></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>
"int" or "uint" (don't know which one it is), you already have support<br>
to pass textures as "sampler2D".<br>
<br>
These are the steps:<br>
<br>
0) Set "i" to 0<br>
1) Get uniform location of your sampler2D (this isn't the textureID NOR<br>
the texture unit)<br>
2) Set your uniform using "glUniformXY(location, i);"<br>
3) Activate your texture using "glActiveTexture(GL_TEXTURE0 + i);"<br>
4) Bind your texture using "glBindTexture(GL_TEXTURE_2D, textureID);"<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">> Here is my report for week 2:<br>
><br>
> <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>
><br>
> Cheers,<br>
> Mitchell Stokes (Moguri)<br>
><br>
><br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<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>
_______________________________________________<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>