Author Topic: setTexture on Object3D with a texture name that doesn't exist in Texturemanager  (Read 1780 times)

Offline madhava.s

  • byte
  • *
  • Posts: 16
    • View Profile
setTexture on Object3D with a texture name that doesn't exist in Texturemanager logs an error and object doesn't showup is it expected behaviour.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Yes. What did you expect to happen instead? Depending on the configuration of Logger, it will either just log the error or raise an exception. If you just log it, the object will have the dummy texture assigned to it, which is all black. It actually should show up, just in black.

Offline madhava.s

  • byte
  • *
  • Posts: 16
    • View Profile
Thanks Egon,
  I'm new JCPt, I was trying to set a texture if not available i want switch to another one. hence was expecting the exception. Thanks for pointing towards config.