www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: kiffa on February 13, 2014, 01:14:55 pm

Title: Got black texture when using mulit textures
Post by: kiffa on February 13, 2014, 01:14:55 pm
code:
Code: [Select]
//first use 1 texture
car.setTexture("car_1");

//after a while, use 2 to blending
int id = TextureManager.getInstance().getTextureID("car_1");
int id2 = TextureManager.getInstance().getTextureID("car_2");
TextureInfo info = new TextureInfo(id);
info.add(id2, TextureInfo.MODE_MODULATE);
car.setTexture(info);

Title: Re: Got black texture when using mulit textures
Post by: EgonOlsen on February 13, 2014, 02:31:36 pm
Maybe one of the textures is black?

Edit: Even if it's not black by itself, it might be rendered in black if you using OpenGL ES 2.0 and one of the textures is not square.