Hey there guys.
Ive just started to learn SDL, and im having a bit of a small problem, im following this tutorial http://lazyfoo.net/SDL_tutorials/lesson01/index2.php the tutorial gets you to draw a simple image to the screen, Now the code i have draws a window but doesnt seem to draw the image,
Im using Visual Studio 2010 C++ express edition,
here is the code
Also im using 1.2.15 SDL, the newest version
also how i add a new image to visual studio is, right click on resources folder -> add existing file -> import my hello.bmp
I have the code working for a 1.2.14 SDL but why isnt it working for SDL 1.2.15? does anyone know what big different there is between the versions?
also how i add a new image to visual studio is, right click on resources folder -> add existing file -> import my hello.bmp
This step does nothing for you. All that does is add the bitmap as a resource, but the code you have there reads the bitmap from the actual file, not a resource.
If it's not working, the thing to check would be to make sure you have the filename right. Also, make sure the file is in the right directory.
Visual Studio typcially makes the working directory the project directory (not the directory the exe is in, but the one the project file is in). Try putting the bitmap in that directory.
Or, as a sanity check, you can put the full path to the bitmap in your code:
Thank you, its been a pain in my butt :(,
cheers, but quickly, when i go to the debug folder, it doesnt have the .bmp file inside and when i run the exe, it doesnt display the image, but it does display if i run the program in visual studio