-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The example code for the new OO API isn't quite right #300
Comments
I gave it a compile and run, the added code worked fine. Is there a way to test if there are RGB colors per vertex? I never use that format, so don't know about it.
Anyway, other than that bonus test, if there is one, looks good. |
@erich666 thanks! > I gave it a compile and run, the added code worked fine There is an example to display vertex color of .obj data in NanoRT example: https://github.com/lighttransport/nanort/tree/master/examples/gui |
Describe the issue
For this main readme file: https://github.com/tinyobjloader/tinyobjloader/blob/master/README.md#example-code-new-object-oriented-api
This "Example code (New Object Oriented API)" code works well to read in cornell_box.obj. There's just one minor issue flagged by Visual Studio, that "v" and "fv" are of different types (size_t vs. int).
But, the access code:
fails and asserts when it tries to read the normals, because there are no normals computed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Here's the fixed code I suggest for the example:
Environment
The text was updated successfully, but these errors were encountered: