digitalmars.D.learn - Anybody know about SDL and particularly SDL_TTF initialization?
- WhatMeWorry` (20/20) May 12 This should be trivial, right?
- Danny Arends (6/26) May 22 No idea why this fails, seems alright to me. You can use:
- Jerry (2/6) May 22 Something hit a null pointer, time to fire up the debugger :)
- solidstate1991 (2/22) Jun 07 I personally recommend using an alternative TTF library.
This should be trivial, right? I've been looking at existing D repo code for hours. Can't figure why TTF_Init doesn't work? It would help if I could figure out how to use SDL_GetError() INFO: SDL loaded v2.30.2 INFO: SDL initialized: 0 INFO: TTF loaded: v2.0.14 Error Program exited with code -1073741819 loadSDL(); SDL_version v; SDL_GetVersion(&v); toStdout("SDL loaded v%d.%d.%d", v.major, v.minor, v.patch); auto initSDL = SDL_Init(SDL_INIT_EVERYTHING); // returns 0 on success toStdout("SDL initialized: %d", initSDL); auto loadTTF = loadSDLTTF(); SDL_TTF_VERSION(&v); toStdout("TTF loaded: v%d.%d.%d", v.major, v.minor, v.patch); auto initTTF = TTF_Init(); // SDL must be initialized before calls to this library
May 12
On Sunday, 12 May 2024 at 20:13:04 UTC, WhatMeWorry` wrote:This should be trivial, right? I've been looking at existing D repo code for hours. Can't figure why TTF_Init doesn't work? It would help if I could figure out how to use SDL_GetError() INFO: SDL loaded v2.30.2 INFO: SDL initialized: 0 INFO: TTF loaded: v2.0.14 Error Program exited with code -1073741819 loadSDL(); SDL_version v; SDL_GetVersion(&v); toStdout("SDL loaded v%d.%d.%d", v.major, v.minor, v.patch); auto initSDL = SDL_Init(SDL_INIT_EVERYTHING); // returns 0 on success toStdout("SDL initialized: %d", initSDL); auto loadTTF = loadSDLTTF(); SDL_TTF_VERSION(&v); toStdout("TTF loaded: v%d.%d.%d", v.major, v.minor, v.patch); auto initTTF = TTF_Init(); // SDL must be initialized before calls to this libraryNo idea why this fails, seems alright to me. You can use: TTF_GetError() for a human-readable error message,when the call to TTF_Init() fails (return -1). Good luck Danny
May 22
On Sunday, 12 May 2024 at 20:13:04 UTC, WhatMeWorry` wrote:INFO: SDL loaded v2.30.2 INFO: SDL initialized: 0 INFO: TTF loaded: v2.0.14 Error Program exited with code -1073741819Something hit a null pointer, time to fire up the debugger :)
May 22
On Sunday, 12 May 2024 at 20:13:04 UTC, WhatMeWorry` wrote:This should be trivial, right? I've been looking at existing D repo code for hours. Can't figure why TTF_Init doesn't work? It would help if I could figure out how to use SDL_GetError() INFO: SDL loaded v2.30.2 INFO: SDL initialized: 0 INFO: TTF loaded: v2.0.14 Error Program exited with code -1073741819 loadSDL(); SDL_version v; SDL_GetVersion(&v); toStdout("SDL loaded v%d.%d.%d", v.major, v.minor, v.patch); auto initSDL = SDL_Init(SDL_INIT_EVERYTHING); // returns 0 on success toStdout("SDL initialized: %d", initSDL); auto loadTTF = loadSDLTTF(); SDL_TTF_VERSION(&v); toStdout("TTF loaded: v%d.%d.%d", v.major, v.minor, v.patch); auto initTTF = TTF_Init(); // SDL must be initialized before calls to this libraryI personally recommend using an alternative TTF library.
Jun 07