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

File System #17

Merged
merged 21 commits into from
Nov 7, 2014
Merged

File System #17

merged 21 commits into from
Nov 7, 2014

Conversation

matteblair
Copy link
Member

Enables read-only access to text files bundled with the application.

I chose to provide a function exclusively for text like shaders, config files, json, etc. because all of our other file needs will likely require significantly different (and possibly platform-specific) implementations. Textures should be loaded with Core Image on iOS (and maybe libpng on Android), cache files might use an SQL database (or maybe Core Storage on iOS); basically, I concluded that writing a totally general file I/O protocol would be a waste.

Also: I've converted the OS X platform file to objective-c++ because the Foundation framework makes file I/O really easy (and possibly faster). I see no downside to using objective-c where reasonable.

This is the simplest interface we can implement on both mobile platforms, but I don't like how unsafe it is (the caller has to manually deallocate the read buffer)
The AssetManager for the MainActivity must now be passed in on construction of the renderer
Scope is now clarified as obtaining strings from internal resource files;
OSX and iOS now both use Foundation functions to load a file into a string -
It is tempting to share a platform file for OSX and iOS but but they will diverge
again once input is implemented.
@matteblair
Copy link
Member Author

Don't merge; just discovered a bug on android.

@matteblair
Copy link
Member Author

Good to merge!

@tallytalwar
Copy link
Member

Looks good. Merging.

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

Successfully merging this pull request may close these issues.

2 participants