DISTS: New Emscripten/WebAssembly dists target
This is an initial version of the emscripten build/dist target. Many things are still missing, see dists/emscripten/README.md for a detailed summary of what this provides and still misses
This commit is contained in:
parent
2f3b74e485
commit
b7a2e22b0a
11 changed files with 608 additions and 1 deletions
|
@ -33,6 +33,10 @@ namespace OpenGL {
|
|||
static const GLchar *readFile(const Common::String &filename) {
|
||||
Common::File file;
|
||||
|
||||
#if defined(EMSCRIPTEN)
|
||||
// Since we need to bundle all files into data files on Emscripten, we keep all shaders in a different folder
|
||||
SearchMan.addDirectory("ALL_SHADERS", "/", 0, 2);
|
||||
#endif
|
||||
// Allow load shaders from source code directory without install them
|
||||
// It's used for development purpose
|
||||
// FIXME: it's doesn't work with just search subdirs in 'engines'
|
||||
|
@ -47,6 +51,9 @@ static const GLchar *readFile(const Common::String &filename) {
|
|||
SearchMan.remove("MYST3_SHADERS");
|
||||
SearchMan.remove("STARK_SHADERS");
|
||||
SearchMan.remove("WINTERMUTE_SHADERS");
|
||||
#if defined(EMSCRIPTEN)
|
||||
SearchMan.remove("ALL_SHADERS");
|
||||
#endif
|
||||
|
||||
const int32 size = file.size();
|
||||
GLchar *shaderSource = new GLchar[size + 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue