An interesting, but frustrating, issue with the DerelictSDL2 binding was recently brought to my attention. You can read the issue thread over at github, but I’ll summarize it here.
When using SDL2 with Derelict on Windows, minimizing a window causes its size to be changed. For me, the new size is consistently 160×24, no matter the original size of the window. This does not happen when similar code is compiled and executed in C or C++ nor does it happen on Linux.
In C, SDL sends the events SDL_WINDOWEVENT_MINIMIZED when the window is minimized and SDL_WINDOWEVENT_RESTORED when it’s restored. The size never changes. With Derelict, it sends the following sequence: SDL_WINDOWEVENT_SIZE_CHANGED, SDL_WINDOWEVENT_RESIZED, SDL_WINDOWEVENT_MINIMIZED, SDL_WINDOWEVENT_RESTORED. If I manually change the size via SDL_SetWindowSize when handling the minimize event, it gets changed back to 160×24 and the size_changed and resized events are again sent just before the restored event.
This one has me good and well stumped at the moment, so I’m coming here to ask anyone using SDL2 with Derelict, or anyone who’s interested in a debugging challenge, and who can reproduce the problem, to lend a hand in finding the culprit. My first guess was that something was off with an event ID or event structure size on the Derelict side, but that didn’t pan out. Of course, it could be something not related to the event system. But I just don’t know where to look.
I appreciate any help anyone can give on this.
I’ve added another new binding to Derelict 3. This one is for version 3 of the Open Asset Import Library (ASSIMP). DerelictASSIMP3 is the package name. It supersedes the existing DerelictASSIMP package, which binds to version 2 of the library and will be removed from the repo in the near future. I’ll leave it in there a while longer to give anyone using it a chance to switch up. And when I do remove it I’ll likely zip it up and throw it on Dropbox for download. For a while anyway.
The new binding compiles and loads. Beyond that, I don’t know if it works or not. I haven’t tested it and likely won’t, as I’ve never used ASSIMP and don’t intend to. It’s likely I’ve overlooked something in the headers, made some typos somewhere, or introduced one bug or another. As always, I’ll happily accept pull requests to fix any deficiencies.
I’ve just added DerelictPhysFS, a binding to the excellent PhysFS library, to Derelict 3. The only caveat is that you’ll need to build PhysFS yourself if you want to use it, as the only packages available for download from the project page are source-only. There may be some binaries hosted out there somewhere, but it’s really easy to build. The source distro contains all the third-party libraries it depends on and builds them all into one binary. Just make sure you have CMake (which you really should, anyway) and a supported compiler and you’ll be good to go.
I’ve been wanting to support DUB for a while, but was reluctant to do so without support for subpackages. In other words, I wanted for Derelict users to be able to specify Derelict packages, like DerelictGL3 or DerelictGLFW3, as dependencies rather than the entirety of Derelict. Thanks to DUB’s maintainer, Sönke Ludwig, that’s now possible. He has released a new version of DUB that supports subpackages and also created a package.json for Derelict.
I haven’t tested this yet, so I don’t know if it builds out of the box. I expect I’ll need to dig into DUB a bit more to tailor the package file more. So if you try this out before I get around to playing with it, please report any issues over at the github issue tracker.
GLFW 3.0 has just been released. SDL 2.0 is in a release candidate state. This means that for both projects the API is set in stone. Additionally, Win32 binary downloads are available from both web sites. As a result, you no longer need to checkout and build the source to use the Derelict3 bindings on Windows. I have removed the download links from the project README to the files I was hosting in my Dropbox account.
As for the SDL2 peripheral libraries, I’ve update the SDL2_image binding to the release candidate. I have yet to get the the others (mixer, ttf, net), but expect to get it done some time this weekend. I would like to remind all users to please report confirmed bugs and other issues via the github issue tracker rather than the Derelict3 forum. If you aren’t sure if something is a bug and need some help figuring it out, the forum is the place to go.