Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

jbailey

Direct3D Texture Tut Problem(C#)

This topic is 5281 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''m getting the following error when I run the mostly unmodified DX SDK texture tutorial code in SharpDevelop: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.DirectX.Direct3D.D3DX.GetUnmanagedDevice(Device device) at Microsoft.DirectX.Direct3D.TextureLoader.FromFile(Device device, String srcFile) at TextureTutorial.Textures.OnResetDevice(Object sender, EventArgs e) in c:\Documents and Settings\Justin\My Document s\SharpDevelop Projects\Direct3DTest\tutorial5.cs:line 97 I did a check which showed that the device is valid. I''m a C++ student with DX knowledge, and I''m just starting to learn C#; am I not setting up something right? The only thing I modified was commenting out the following line because it was throwing an exception: this.Icon = new Icon(this.GetType(), "directx.ico"); exception thrown was: Unhandled Exception: System.ArgumentException: Resource ''directx.ico'' could not be found in class ''TextureTutorial.Textu res''. at System.Drawing.Icon..ctor(Type type, String resource) at TextureTutorial.Textures..ctor() in c:\Documents and Settings\Justin\My Documents\SharpDevelop Projects\Direct3DTe st\tutorial5.cs:line 53 at TextureTutorial.Textures.Main() in c:\Documents and Settings\Justin\My Documents\SharpDevelop Projects\Direct3DTes t\tutorial5.cs:line 202 Thanks ahead for any help.

Share this post


Link to post
Share on other sites
Advertisement
I also just realized that the Mesh example after that one is throwing the same exception from the Mesh.FromFile method.

Share this post


Link to post
Share on other sites

  • 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!