NullReferenceException

Burst

01-02-2010 09:43:07

unhandled System.NullReferenceException
Message="未将对象引用设置到对象的实例。"
Source="MogreFramework"
StackTrace:
at MogreFramework.OgreWindow.SetupDirectX()
at MogreFramework.OgreWindow.InitializeOgre()
at MogreFramework.OgreWindow.Go()
at Tutorial02.Program.Main() located C:\Documents and Settings\bz\My Documents\Visual Studio 2008\Projects\MogreTest\MogreTest\Program.cs:line 16
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

I'm a beginner, Please help me.

smiley80

02-02-2010 12:42:18

Looks like Ogre can't find the Direct3D rendersystem.

Your plugins.cfg has to look something like this:
# Define plugin folder
PluginFolder=.

# Define plugins
Plugin=RenderSystem_Direct3D9


And you have to have 'RenderSystem_Direct3D9.dll' in the same folder as your exe.

Burst

08-02-2010 14:00:39

Thank you very much.
But I got another problem...
OGRE EXCEPTION(2:InvalidParametersException): Cannot find requested emitter type. in ParticleSystemManager::_createEmitter at ..\src\OgreParticleSystemManager.cpp(line 324)

GantZ

08-02-2010 17:56:00

check that you got this line

Plugin=Plugin_ParticleFX

in your plugin.cfg. also check that Plugin_ParticleFX.dll is in the folder of your exe.

Burst

09-02-2010 10:03:32

Thanks.