S.L.C wrote:Also, considering you'd have to link the engine to libjpeg, libpng and zlib. You might as well use those to read images and discard stb_image and jo_jpeg. Not that they have any significance to the final executable but they feel kinda redundant.
I agree. They are redundant. A better solution is to not link all those libraries in question but use STB lib and link with that instead. If you take a look at LibBrowser/netsurf folder, you'll also see that there are libnsgif and libnsbmp libraries. Instead of building those libraries where they are, they're brought local to 60_NetSurf/NetSurf folder. In addition, all image wrapper classes needed for netsurf: i.e. bmp.c, gif.c, jpeg.c, etc., are also brought local for the purpose of being able to wrap them with STB for Urho3D. But to do that, STB lib would have to be modified and that's something that I don't want to touch atm. In any case, I brought the image wrapper classes local to make it flexible for anyone porting netsurf to, perhaps, stand-alone SDL or other rendering libs other than using Urho3D.
Another flexibility in this setup is that for a stand-alone browser using Urho3D, all those image wrapper classes can be wrapped with Urho3D::Image class and SDL_Surfaces with Urho3D::UI components. Choices are there for w/e someone wants to do with this port.