Re: Loading bmp SDL problem

Do you have the bitmap in the same directory as the project? The fact that it compiles points to the fact that it can't find the bitmap you are trying to load.

I don't know to be honest, how do I do that?
I added the bitmap to the solution explorer, to which it made a folder for it.
And I assumed that was all that was needed to be done (this is what I do in XNA and it works fine).

Re: Loading bmp SDL problem

Posted 01 September 2011 - 01:38 PM

Just use windows explorer and copy and paste the .bmp into the folder that has your code in it, you will also have to put the .bmp into the folder with your .exe in it if you want to run it outside visual studio.

Re: Loading bmp SDL problem

Posted 02 September 2011 - 04:57 AM

I'm hoping it can do 3D well as making little 2D games in XNA isn't really that impressive.
That was the plan for DirectX, but I just couldn't get it to compile
So I chose SDL as my former tutor recommends it.

Re: Loading bmp SDL problem

Posted 02 September 2011 - 02:34 PM

Rather than copy pasting all the time you can click the resource and then in the properties set it to copy to output directory either always or when new. This way it will copy automatically to both debug and release builds. I think you can also just set the folder resources to this as well so any content you add to it will be automatically copied.

Re: Loading bmp SDL problem

Re: Loading bmp SDL problem

Posted 04 September 2011 - 06:11 AM

Seriously though, you should do as much within the IDE as it can do for you project - that is it's purpose. For large projects having separate batch files offers the potential to seriously break the code base, as well as having configuration issues when a team of programmers are working on a project. It just won't work.