I am trying to display an png or jpg file with SDL 2.0.1, SDL Image 2.0.0 and c++, but it does not work. (I am new to SDL) I wrote a program that does the following things:
- Drawing background (is working)
- Creating random pixels / displaying them (is working often (still got problem with random values))
- Display the png /jpg file (none of them is working)
I'm using visual studio 2012 express / visual studio 2013 professional. due to the fact that i am developing on windows OS I can see the image (by hovering the application in the task bar) is being loaded in the buffer (or what ever) but it is not being displayed in the real application. the rest could be rendered, except the image. All functions are returning the right values. clean up and rebuild doesn't work either.
The project links the following libraries:
- SDL2.lib
- SDL2main.lib
- SDL2_image.lib
The include folders are the x86 folders. DLL files from x86 folders are placed in my project folder.
It's not much code really, so I inserted a link to the project files, so that it can be downloaded and I would be very thankful for any help. I'm kind of desperate, cause I'm trying to handle that bug for a few days now.
I also tried coding on 2 different computers. same problem on both of them.
Download the project: here
(You may have to restart application, because of the random pixel problem)
Is there anyone who could tell me what I am doing wrong?