Skip to main content
gamedev.net
🔒 Locked

Direct3D Texture Tut Problem(C#)

Started by jbailey Jun 2, 2004 at 2:51 AM 0 replies 500+ views
Original Post
jbailey
jbailey
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.
jbailey
jbailey
I also just realized that the Mesh example after that one is throwing the same exception from the Mesh.FromFile method.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.