[Coin-discuss] How to use multiple SoTexture3 nodes for a SoShaderProgram
Matthew Saltzman
mjs at clemson.edu
Fri Jan 15 09:47:41 EST 2010
Nat-
I think you want coin3d.org, not coin-or.org.
Good luck!
On Fri, 2010-01-15 at 14:59 +0100, Reynolds, Nathaniel wrote:
> Hi,
>
> I don't have any previous OpenGL experience, and now I'm trying to create a shader program (using glsl) that utilizes 3 different SoTexture3 nodes. I know I have to set a unique texture unit value for each of these nodes, but SoTextureUnit doesn't seem to accomplish this. How else can I do this? I've been trying something like...
>
> Separator{
> TextureUnit{ value 0 }
> Texture3{ }
> TextureUnit{ value 1 }
> Texture3{ }
> TextureUnit{ value 2 }
> Texture3{ }
> ShaderProgram {
> shaderObject [
> VertexShader {
> sourceProgram "myvertexshader.glsl"
> }
> FragmentShader {
> sourceProgram "myfragmentshader.glsl"
> parameter [
> ShaderParameter1i { name "sameAsInGlslCode0" value 0 }
> ShaderParameter1i { name "sameAsInGlslCode1" value 1 }
> ShaderParameter1i { name "sameAsInGlslCode2" value 2 }
> ]
> }
> ]
> }
> Cube { }
> }
>
> Any help would be much appreciated.
>
> Thanks
> Nat
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
--
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs
More information about the Coin-discuss
mailing list