Closed bagomot closed 11 months ago
Do you have a full example? Are you calling InitWindow
before all this?
Do you have a full example? Are you calling
InitWindow
before all this?
You are right, if I run the example https://github.com/D-a-n-i-l-o/raylib-d_examples/blob/main/examples/textures/051_textures_image_loading/source/app.d, then everything works. In my program this is probably executed before the window is called.
Yeah InitWindow actually also initializes some things that are needed for textures. See this wiki entry. https://github.com/raysan5/raylib/wiki/Frequently-Asked-Questions#why-does-calling-loadtexture-crash-my-program
Example code;
Output:
Raylib version: 5.0.0 Raylib-d version: 5.0.0 OS: Windows 11 x64
Similar C code works.