C
cprog84
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.Textures'.
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.
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.Textures'.
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.