Giter Site home page Giter Site logo

Comments (5)

syoyo avatar syoyo commented on May 29, 2024

Super cool! > R

We create default material when there's no .mtl, so this should be an expected behaviour.
But it may be nice we have materialFound flag somewhere?

from tinyobjloader.

jefferis avatar jefferis commented on May 29, 2024

Thanks for quick response! I think it would be good to indicate that the material file has not been found, but I think you are saying that this should not be an error (because we might want to be able to open an obj file even if the material file is missing).

from tinyobjloader.

syoyo avatar syoyo commented on May 29, 2024

Okay, I'll consider to add some flag > I think it would be good to indicate that the material file has not been found

from tinyobjloader.

jefferis avatar jefferis commented on May 29, 2024

Now in addition, I noticed this because the default material can have some strange values. It seems that

InitMaterial(material); 

is never called in this case because it is inside the read loop (see https://github.com/syoyo/tinyobjloader/blob/master/tiny_obj_loader.cc#L421-L462). So should it not be placed right after?

 material_t material;

Finally, I noticed the strange values only from R, not running test_loader, so perhaps different compiler flags are resulting in default initialisation in some cases but not others. I am using Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn). Thanks again!

from tinyobjloader.

syoyo avatar syoyo commented on May 29, 2024

Good catch! > strange values.

Add fix for InitMaterial and add warning message to err. Strictly say, its warning, but would be ok to store warning message in err, since this does not change any API interface.

164c152

from tinyobjloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.