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

Loading data files #24

Open
sbusch42 opened this issue May 1, 2019 · 0 comments
Open

Loading data files #24

sbusch42 opened this issue May 1, 2019 · 0 comments

Comments

@sbusch42
Copy link
Member

sbusch42 commented May 1, 2019

We need a way to access data files, that works for both the native and the web case.
I'm thinking along these lines:

  • A utility struct, which is instantiated in the binary, that somehow knows and returns the base data path. In the native case, this would be a local file path (see cpplocate for how we could implement it), and in the web-case it would be the base URL the website is served from.
  • A Loader interface takes this base location + relative path to load a file and return the contents. This will most probably need to be asynchronous, as it needs to be in the web case.
  • Do we need further abstractions? E.g., if on WebGL a texture can only be created from an JS Image object, do we have to abstract that or are there possibilities to get the binary data, so we could use the same image loading routine as for native?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant