In my project i have an Animator class, which has a method to load all sprites.
SDL_Texture*
Animator::CF_createImage_Load( SDL_Renderer* FP_renderer , std::string FV_path ,Uint8 FV_brC1,Uint8 FV_brC2,Uint8 FV_brC3, SDL_Window* window )
{
SDL_Surface* loadSurface = IMG_Load(FV_path.c_str());
SDL_Texture* texture = SDL_CreateTextureFromSurface( FP_renderer , loadSurface );
SDL_SetTextureColorMod(texture, FV_brC1, FV_brC2, FV_brC3);
SDL_SetTextureBlendMode( texture , SDL_BLENDMODE_ADD );
return texture;
SDL_FreeSurface( loadSurface );
SDL_DestroyTexture( texture );
}
So if I run it within the IDE, it loads all sprites properly without any error. I just checked all pointers for debugging, all of them are ok, every image is shown properly as I said, but only within the IDE. If i build it and try to run the executable outside of the IDE ( in release or debug folder ), images are not shown at all.
There is one more thing. Font are loaded properly outside of the IDE, but Sprites aren't.