On Tuesday, 9 December 2014 at 22:27:43 UTC, anonymous wrote:
On Tuesday, 9 December 2014 at 16:12:35 UTC, Paul wrote:
import derelict.sdl2.sdl;
import std.stdio;
import std.conv;
void main()
{
scope(exit) {
SDL_Quit();
}
DerelictSDL2.load();
DerelictSDL2Image.load();
When I run dub that last line gives me:
source/app.d(15): Error: undefined identifier DerelictSDL2Image
You're missing `import derelict.sdl2.image;`.
Adding that reveals that I need to add SDL_image 2.0 (I didn't
know that that wasn't a part of the standard SDL install) so I've
compiled that too. I now get the error:
Unsupported image format
whether I use a png or jpg.
IMG_Load() does however work in the same way as SDL_LoadBMP if I
feed it a .bmp - the image is displayed but there is a seg fault.
Nightmare.