Skip to content
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

Improve texture file locating #807

Closed
hollasch opened this issue Nov 21, 2020 · 1 comment
Closed

Improve texture file locating #807

hollasch opened this issue Nov 21, 2020 · 1 comment
Assignees
Milestone

Comments

@hollasch
Copy link
Collaborator

We need a better solution for our texture map file loading. I have scripts that put the image file in just the right place for the way I build and run the project, but that will be unique to each developer.

Thinking of writing a utility function that tries file, images/file, ../images/file, ../../images/file, ../../../images/file, and so on until ... some point. I can't do too much with the file system in C++11 in an OS-agnostic way, so it'll have to be somewhat simple-minded. Thinking of putting this in the rtw_stb_image.h file as a helper function.

@hollasch hollasch added this to the v4.0.0 milestone Nov 21, 2020
@hollasch hollasch self-assigned this Nov 21, 2020
hollasch added a commit that referenced this issue Nov 23, 2020
- Honors RTW_IMAGES environment variable to locate RTW image directory
- If RTW_IMAGES is unset, searches for image files in several likely
  image directory locations.
- Separates image data management from diffuse texture map class.
- Better error reporting on image load failure.
- More robust getters in the face of absent image data.

Resolves #807
@hollasch
Copy link
Collaborator Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant