Well, we got around the problem using link re-ordering as far as I remember.
As we do not want to use SFML texture loading code anyway, this works for us. But it will fail if we plan to load textures through both Horde and SFML as one or the other will mix textures up.
I think Horde changed some parts of the stbi, so I think I'd stay with that.
To me, I think it is SFML's fault to expose the internal stbi symbols, that should be kept inside.
But changing SFML might be tedious (there is already a nasty static GLcontext creation going on on MODULE linker loading time when static symbols get initialized), so the easiest fix is certainly:
Put the stbi symbols from horde inside a namespace, so they cannot be mixed up with symbols outside the library. I think I'll give this a try tomorrow, as linking order is always a bit nasty too.
BTW: I heard people might have problems with interoperability of SFML and Horde, e.g. overlays or sprites in SFML not working. It is a good idea to save/restore GL render state before calling h3dInit and h3dRender.
Code:
void saveGLState()
{
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glPushAttrib(GL_ALL_ATTRIB_BITS);
}
void restoreGLState()
{
glPopAttrib();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glUseProgram(0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); // maybe not needed
glBindBuffer(GL_ARRAY_BUFFER,0); // maybe not needed
}