Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

it isn't possible to load textures usin...

Help
2011-02-27
2013-05-02
  • Plaque Attack
    Plaque Attack
    2012-01-02

    I have feeling this library isn't being maintained - which is a shame since its the only one that seems to load/save psd and dds files. 

    I think the problem the OP was running into is an incompatibility with wchar_t * in the loadimage function.  For some reason, it requires a const wchar_t* parameter, but then treats the string as a regular const char* internally.  SO… if you wish to get images to load, pass in a const char string and cast it to wchar_t*   like this:

    ilLoadImage((const ILstring) "C:\\ImageFiles\\image.jpg")

    ILstring is defined as wchar_t*, so this is a const wchar_t* cast. 

    This also applies to the ilSaveImage function.

    Since this is dubious from a safety standpoint, you might want to look at the ilLoadF functions instead and handle the filenames yourself.   Can't help you there with specifics though, since the documentation hasn't been good enough for me to figure out how to get that to work either.