STREGAsGate / Raylib

A Swift package for Raylib. Builds Raylib from source so no need to fiddle with libraries. Just add as a dependency in you game package and go!
MIT License
110 stars 14 forks source link

rlLoadTexture EXC_BAD_ACCESS #2

Closed GothStar closed 2 years ago

GothStar commented 2 years ago

Hello! It's most likely I'm doing something wrong...

Let's say I'm trying to load image: public var fish1 = Raylib.loadImage(Bundle.module.path(forResource: "fish1", ofType: "png", inDirectory: "Resources") ?? "") And it's loaded successfully (output from terminal): File loaded successfully INFO: IMAGE: Data loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)

But then I'm trying to load texture: public var fishTexture1 = Raylib.loadTextureFromImage(fish1) And it bring back to _Sources/RaylibC/UnmodifiedRaylibCSrc/rlgl and rlLoadTexture (line number 2688) with EXC_BAD_ACCESS Thanks in advance for your help!