TextureLoader and D3DERR_INVALIDCALL

zerodefect

Newcomer
Joined
May 26, 2006
Messages
1
this is my first times using direct3d, and i want to create my own tile based games. we made a tile engine before along time ago in c++ but now i want to try it in c#. the problem i am having is i cant seem to load a texture. i am using TextureLoader.FromFile and everytime i do, it keeps crashing my program and throwing a direct3dxexception. no matter what i cannot get it too load the texture. i guess what i am trying to do is simply load a background bitmap (800x600) and display it as the background to my engine. i dont know what the problem is, but i cant seem to get it to work no matter how many times ive tried. i keep getting this error and i dont know what it could mean. i am using an orthographic projection. can anyone show me an example of loading and displaying a bitmap in the simpliest way possible. i cant see what im doing wrong. thank you!
 
Can you post your code where you are loading the texture and how you've defined the variables?
 
The most common bug with loading any resource is the file path. You either need to use the full file path or place the file in the app directory.
 
Back
Top