1
Support / Re: Changing PNG texture brightness
« on: June 15, 2014, 10:30:16 am »
You're welcome! Thanks again for your help and for your work on jPCT.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
// Create a texture out of the icon...:-)
Texture texture = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.icon)), 64, 64));
TextureManager.getInstance().addTexture("texture", texture);
try {
Texture texture2=new Texture(getResources().getAssets().open("alpha.png"), true);
TextureManager.getInstance().addTexture("texture2", texture2);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
TextureInfo ti=new TextureInfo(TextureManager.getInstance().getTextureID("texture"));
ti.add(TextureManager.getInstance().getTextureID("texture2"), TextureInfo.MODE_DECAL);
And changing the ambiant light or the light values have no effect on the texture lighting in the HelloWorld-AE project (as downloaded from http://www.jpct.de/download/net/jpct-ae.zip). Texture texture = new Texture(getResources().getAssets().open("Turret_01.bmp"), true);
TextureManager.getInstance().addTexture("texture", texture);
TextureInfo ti=new TextureInfo(TextureManager.getInstance().getTextureID("texture"));
turret.setTexture(ti);