Do not access DevIL's functions from multiple threads
Although this is not OpenGL related post, I think it is worth mentioning here and warn community, especially beginners, that DevIL image manipulation library has a very bad design, and does not allow access from multiple threads.
The reason is simple, it attempts to mimic OpenGL and the way it handles buffers, but there is a crucial difference; OpenGL allows just one thread to access a single context. DevIL does not have context, and the state is global. Setting current image as a global state is meaningless in moder applications. The only way (I can see) to make DevIL threadsafe is to add all image manipulation functions in a singleton object. For me, this is also a bad design, but at least an application will not crash.
My attempt to transfer the code to use DevIL was a total failure. I'll back to GDI+ definitely.
What do you suggest as a cross platform image manipulation library?