zerodefect Posted May 26, 2006 Posted May 26, 2006 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! Quote
ardman Posted June 1, 2006 Posted June 1, 2006 Can you post your code where you are loading the texture and how you've defined the variables? Quote
Grasshopper-NET Posted October 28, 2007 Posted October 28, 2007 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.