Author Topic: How To Put Different Textures On Different Sides Of A Box?  (Read 1077 times)

Offline darkvai

  • byte
  • *
  • Posts: 1
    • View Profile
How To Put Different Textures On Different Sides Of A Box?
« on: December 24, 2011, 09:03:51 pm »
How Do I Put Different Textures On Different Sides Of A Box?
Sorry If this already exists, but i just started.
Also, its for android  (jPCT-AE).
Thanks,
Me  :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12035
    • View Profile
    • http://www.jpct.net
Re: How To Put Different Textures On Different Sides Of A Box?
« Reply #1 on: December 25, 2011, 11:38:20 am »
Either use the PolygonManager, create the cube in a modeller that way or in code. You can use this as a starting point: http://www.jpct.net/wiki/index.php/Create_a_cube

Just keep in mind that its better in terms of performance to limit the number of texture/object to one per stage. If possible, bake all textures into one larger one. For a single cube, it doesn't matter though.

Offline AGP

  • quad
  • ******
  • Posts: 1639
    • View Profile
Re: How To Put Different Textures On Different Sides Of A Box?
« Reply #2 on: December 27, 2011, 07:40:01 pm »
Which begs the question: does the Skybox class internally bake the textures?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12035
    • View Profile
    • http://www.jpct.net
Re: How To Put Different Textures On Different Sides Of A Box?
« Reply #3 on: December 27, 2011, 08:08:42 pm »
No, it doesn't. As said: For a single cube, it doesn't matter. It only matter if you are going to render dozens of them...but you usually don't do this with sky boxes... ;)