Here is my GLSL program:

Code: Select all

```
uniform sampler2D sampler;
uniform sampler2D sampler2;
uniform sampler2D sampler3;
void main(void)
{
vec4 currentSample = vec4(0.0,0.0,0.0,0.0);
vec4 currentSample2 = vec4(0.0,0.0,0.0,0.0);
vec4 currentSample3 = vec4(0.0,0.0,0.0,0.0);
currentSample = texture2D(sampler,gl_TexCoord[0].st);
currentSample2 = texture2D(sampler2,gl_TexCoord[0].st);
currentSample3 = texture2D(sampler3,gl_TexCoord[0].st);
gl_FragColor = currentSample + currentSample2 + currentSample3;
}
```

Code: Select all

```
Texture2D anotherTexture = (Texture2D)
AttributeEntityUtility.createAttributeEntity(Texture2D.class,POLYGON_SHADER+"."+TEXTURE_2D_2,ap,true);
Texture2D lookupTexture = (Texture2D)
AttributeEntityUtility.createAttributeEntity(Texture2D.class, POLYGON_SHADER+"."+TEXTURE_2D_1, ap, true);
Texture2D tex = (Texture2D)
AttributeEntityUtility.createAttributeEntity(Texture2D.class, POLYGON_SHADER+"."+TEXTURE_2D, ap, true);
```

Code: Select all

```
glslProg.setUniform("sampler", 0);
glslProg.setUniform("sampler2",1);
glslProg.setUniform("sampler3",2);
```