   Can't load a sprite
  I was following a tutorial about an introduction to sprites, but something is bothering me.Does it matter where the location of the image file is?Because it appears to be so. If that's true, where should I be putting the file?To just see if the cpp compiled, I copied the example cpp and made my own L"example.png" but when it ran the sprite image wouldn't appear and I had to shut down the computer because of alt+tabbing out of DirectX.   
  My IDE would have me place the image in the project file. Some might have you place it in a resources folder, I don't know. Depending on which IDE you're using, you might want to look into this.How does DX handle failed loads?: OpenGL, for example, will load an image, but if the load fails, nothing will happen. My program will continue on its happy way, never caring. You should try to write code for if the image doesn't load, and if you can't keep the game running, you should exit (with some way of telling yourself what the problem was). But I know there was a problem because the texture comes back as zero.   ;  File loading commands usually assume that you give it a path to the file, relative to some current working directory. That's usually the same directory that the program is executing from, but it could be different depending on your operating system or compile settings. You need to figure out the full relative path to your resources from that default directory.Give us your language and compiler and we can help you more.   ;  Using Microsoft Visual C++ Studio 2008 Express Edition.Thanks for the help.   ;  By default its the same directory the cpp and h files are are(The project directory).You can change it by:Project -> PropertiesConfiguration Properties -> DebuggingChange the "WorkingDirectory" field to the path where you "game dir" iseg: "D:\cpp\games\space game\game dir"   ;  If your image is in the working directory (as the last poster mentioned), you can just call the image name: "image.tga". If it's in a subdirectory, as my images are, you'll have to include that: "textures/image.tga".   