SFML community forums

Help => General => Topic started by: homik on February 17, 2017, 12:04:09 am

Title: Unable to load textures (SFML Game Development, chapter 3)
Post by: homik on February 17, 2017, 12:04:09 am
Hi.
I have some problem with project after chapter 3. When I run application, there is only black screen and white statistics text.
I'm working on:
- Visual Studio Community 2015,
- Windows 10,
- SFML 2.3.2.

When I run it from command line, it shows that program can't load from file Eagle.png, but I check and it shows with every .png files.
Directory is the same as after chapter 2 (which works and displays background and aircraft) - I store all .h, .cpp files and media folder (with font and .png) in folder with .vcxproj.

Code is exactly the same as on github.

I searched in google, this forum and I can't find the right solution  :-\
Sorry for english, if something wrong :)
Title: Re: Unable to load textures (SFML Game Development, chapter 3)
Post by: EGYPTIAN CODER on February 17, 2017, 10:44:36 am
maybe the files isn't in the working directory
maybe you forgot to add (.png) when you have called loadfromfile function   
Title: Re: Unable to load textures (SFML Game Development, chapter 3)
Post by: homik on February 17, 2017, 01:53:46 pm
When I copy media folder to others and it doesn't change anything, still displays black screen only with statistics.
.png is from beginning  :-\
Title: Re: Unable to load textures (SFML Game Development, chapter 3)
Post by: homik on February 18, 2017, 12:54:27 am
I found the reason... I missed one '!' symbol in FOREACH macro  :P