Author Topic: Got black texture when using mulit textures  (Read 1973 times)

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Got black texture when using mulit textures
« 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);


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Got black texture when using mulit textures
« Reply #1 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.
« Last Edit: February 13, 2014, 02:40:11 pm by EgonOlsen »