octo-code / webp-unity3d

unity3d version of webp
Apache License 2.0
39 stars 16 forks source link

WebGL support? #16

Open maxplayrix opened 6 years ago

maxplayrix commented 6 years ago

Hi! I was trying to use your lib in WebGL project, but I've got an error: uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace

So, how difficult to make this lib works on WebGL platform? I can try to do it myself but I need some help with this. Can you give me some advice on how I can do it. Or the best way if you can do lib with WebGL support. Thank you!

TimAidley commented 6 years ago

webp for unity3d uses native plugins to do the webp reading and writing, so I wouldn't normally expect it to work with Webgl. However, I did find this from Unity on using native compiled dlls in webgl:

https://blogs.unity3d.com/2017/01/19/low-level-plugins-in-unity-webgl/

I have no idea whether it will work, but good luck!