Menu

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

Help
2011-02-27
2015-10-31
  • 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.

     
  • Youda

    Youda - 2015-10-31

    This didn't solve the problem.
    I tried:
    1. undef _UNICODE
    2. define _UNICODE and casting to wchar_t*
    3. define _UNICODE and converting to wchar_t*
    still error 1291 (IL_INVALID_EXTENSION) after ilLoadImage

     

Log in to post a comment.