|
I'd like to know ... using RGBA texture image...
I'm beginner...
front textured polygon and behind textured polygon is not
blended......
below.. The classes I used...& some code
lines...
TextureLoader,
TextureAttributes,
Texture
TextureLoader tex = new
TextureLoader("particle.gif", Texture.RGBA, observer) ;
TextureAttributes texAttr = new
TextureAttributes()
;
texAttr.setTextureMode(TextureAttributes.MODULATE) ; Texture texture = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA, 256, 256) ; texture = tex.getTexture() ; // Polygon's Transparency
TransparencyAttributes ta = new TransparencyAttributes()
;
ta.setTransparency(0.5f) ; ta.setTransparency(TransparencyAttributes.BLENDED) ; ta.setTransparency(TransparencyAttributes.NICEST) ; ta.setCapability(TransparencyAttributes.ALLOW_MODE_WRITE) ; // Polygon's Appearance
app.setTransparencyAttributes(ta)
;
app.setTexture(texture) ; app.setTextureAttributes(texAttributes) ; |
