return a NULL pointer in tempSurfaceP, even though the file was successfully opened with SDL_RWFromFile().
When I instead use SDL’s built-in methods to load a .tga or .bmp, it works fine. But SDL_Image fails.
A call to SDL_GetError() after this returns an empty or null string.
Are there any demo/example programs out there that successfully use SDL_Image? All the demos that come in the “Demos” folder with SDL 1.3 use the built-in methods, not SDL_Image.
return a NULL pointer in tempSurfaceP, even though the file was
successfully opened with SDL_RWFromFile().
When I instead use SDL’s built-in methods to load a .tga or .bmp, it works
fine. But SDL_Image fails.
A call to SDL_GetError() after this returns an empty or null string.
Are there any demo/example programs out there that successfully use
SDL_Image? All the demos that come in the “Demos” folder with SDL 1.3 use
the built-in methods, not SDL_Image.
I didn’t realize a Mercurial repository was available for SDL_Image. I had thought 1.2.10 was the absolutely latest version. Apparently not by a longshot! I’m downloading the latest from Mercurial right now, and expect that this will fix the issue.
Nevermind, got it working. Was an issue with XCode where XCode does not properly handle the fact that you changed a static library, even if you remove and add it back to the project. Somehow it still uses the data from the old library, even if you “Touch” it. I got around the problem by renaming the library – this successfully triggers XCode to realize it’s now different. And now it works.
I had similar problems (segfaults) on Android when using SDL_RWFromFile.
I ended up converting the image(s) to xpm (imagemagick’s convert tool
does that) which basically converts the image into a source file. Then
include that in your app.
/* in SDL 1.3 you would go on converting temp to a texture */–
Earthquake Magnitude: 4.7
Date: Friday, January 13, 2012 19:46:09 UTC
Location: Queen Charlotte Islands, Canada region
Latitude: 51.2617; Longitude: -130.3610
Depth: 15.00 km