Jump to content
  • Advertisement
Sign in to follow this  
nickwinters

[.net] Trouble loading textures

This topic is 5040 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've tested my game on 4 computers, and it so far works perfectly on 2 of them. One of them gives me the following message, source, and stacktrace: Message: Error in the application. Source: Microsoft.DirectX.Direct3D Stack Trace: at Microsoft.DirectX.Direct3D.Texture.CreateTextureFromBitmap(Device device, Bitmap image, Usage usage, Pool pool) at Microsoft.DirectX.Direct3D.Texture..ctor(Device device, Bitmap image, Usage usage, Pool pool) at Nova.Form1.InitializeGraphics() at Nova.Begin.Main() To me, this looks like it's failing to load the texture. The only call in InitializeGraphics() that uses textures is the following: tex=new Texture(device, new Bitmap("art\\starfieldold.bmp"), Usage.Dynamic, Pool.Default); On the computer on which it fails, the file is there, and image viewers load it fine. Anyone know what could be causing this to fail? Thanks. -Nick

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Texture loading is effected by the capibilities of the graphics hardware on each computer. And could be any number of things: The memory size of the texture, the dimensions, the format are just a few that come to mind.
Take a look at the texture caps in the caps viewer on each machine, what are the differences?
Some graphics cards require square power of two sized textures, most(all) cards have an upper limit on the dimensions of a texture. Some cards may not support dynamic textures at all. Many cards only support a limited set of texture formats that may be different for static and dynamic textures.

Also, a stack trace is great, but what was the exception? InvalidCallException, OutOfVideoMemoryException, OutOfMemoryException ?

You may want try running with the Debug Runtime to get more helpful error output.

hope this helps.
past.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!