OgreSdk 1.9.1 - 断言失败

时间:2013-07-30 21:23:31

标签: c++ ogre

我试图在Windows 7上使用Visual Studio 2012(x64)设置Ogre 1.9。我设法解决了一些错误,但是我收到了一条MessageBox错误信息:

Assertion failed!

Program: C:\OgreSDK\bin\Debug\OgreOverlay_d.dll
File: ..\..\..\..\..\Components\Overlay\src\Ogre...Manager.cpp
Line: 52

Expression: msSingleton

For information on how your program can cause an assertion failure, see the Visual C++     documentation on asserts

(Press Retry o debug the application - JIT must be enabled)

然后给我3个选项:Abort,Retry和Ignore。 Abort是我能做的唯一一个不需要ctrl + alt + delete和计算机重启的人。

我的Ogre.cfg文件:

Render System=OpenGL Rendering Subsystem

[Direct3D9 Rendering Subsystem]
Allow DirectX9Ex=No
Allow NVPerfHUD=No
FSAA=0
Fixed Pipeline Enabled=Yes
Floating-point mode=Fastest
Full Screen=Yes
Multi device memory hint=Use minimum system memory
Rendering Device=Monitor-1-NVIDIA GeForce GTX 550 Ti
Resource Creation Policy=Create on all devices
Use Multihead=Auto
VSync=No
VSync Interval=1
Video Mode=800 x 600 @ 32-bit colour
sRGB Gamma Conversion=No

[Direct3D11 Rendering Subsystem]
Allow NVPerfHUD=No
Driver type=Hardware
FSAA=0
Floating-point mode=Fastest
Full Screen=Yes
Information Queue Exceptions Bottom Level=Info (exception on any message)
Max Requested Feature Levels=11.0
Min Requested Feature Levels=9.1
Rendering Device=NVIDIA GeForce GTX 550 Ti
VSync=No
VSync Interval=1
Video Mode=800 x 600 @ 32-bit colour
sRGB Gamma Conversion=No

[OpenGL Rendering Subsystem]
Colour Depth=32
Display Frequency=60
FSAA=0
Fixed Pipeline Enabled=Yes
Full Screen=Yes
RTT Preferred Mode=FBO
VSync=No
VSync Interval=1
Video Mode=1024 x 768
sRGB Gamma Conversion=No

我的Ogre.log:

04:08:53: Parsing scripts for resource group Essential
04:08:53: Parsing script SdkTrays.material
04:08:54: Parsing script OgreProfiler.material
04:08:54: Finished parsing scripts for resource group Essential
04:08:54: Creating resources for group Essential
04:08:54: All done
04:08:54: Parsing scripts for resource group General
04:08:54: Finished parsing scripts for resource group General
04:08:54: Creating resources for group General
04:08:54: All done
04:08:54: Parsing scripts for resource group Internal
04:08:54: Finished parsing scripts for resource group Internal
04:08:54: Creating resources for group Internal
04:08:54: All done
04:08:54: Parsing scripts for resource group Popular
04:08:54: Parsing script DualQuaternion.program
04:08:54: Parsing script Examples.program
04:08:55: Parsing script Instancing.program
04:08:55: Parsing script StdQuad_vp.program
04:08:55: Parsing script deferred_post.program
04:08:55: Parsing script ShadowCaster.program
04:08:55: Parsing script GBuffer.program
04:08:55: Parsing script triplanarReference.program
04:08:56: Parsing script ASCII.material
04:08:56: Parsing script ASMSwizzle.material
04:08:56: Parsing script BlackAndWhite.material
04:08:56: Parsing script Bloom.material
04:08:56: Parsing script Bloom2.material
04:08:56: Parsing script CGSwizzle.material
04:08:56: Parsing script CompositorDemo.material
04:08:56: Parsing script DepthShadowmap.material
04:08:57: Parsing script Dither.material
04:08:57: Parsing script DOF.material
04:08:57: Parsing script DualQuaternion.material
04:08:57: Parsing script Embossed.material
04:08:57: Parsing script Example-Water.material
04:08:57: Parsing script Examples-Advanced.material
04:08:59: Compiler error: object unsupported by render system in Examples-Advanced.material(617): , Shader name: Examples/FresnelRefractReflectPS
04:08:59: Parsing script Examples-DynTex.material
04:08:59: Parsing script Examples-Water.material
04:08:59: Parsing script Examples.material
04:09:03: Parsing script facial.material
04:09:03: Parsing script Glass.material
04:09:03: Parsing script GLSLSwizzle.material
04:09:03: Parsing script Halftone.material
04:09:03: Parsing script hdr.material
04:09:04: Parsing script HeatVision.material
04:09:04: Parsing script Hurt.material
04:09:04: Parsing script HWInstancing.material
04:09:04: Parsing script HW_VTFInstancing.material
04:09:05: Parsing script HW_VTF_LUTInstancing.material
04:09:06: Parsing script instancing.material
04:09:07: Parsing script InstancingMisc.material
04:09:07: Parsing script Invert.material
04:09:07: Parsing script IsoSurf.material
04:09:07: Problem parsing the following Cg Uniform: '@TMP29' in file Ogre/IsoSurf/TessellateTetrahedraGS_CG
04:09:07: Parsing script Laplace.material
04:09:07: Parsing script MotionBlur.material
04:09:07: Parsing script MRTtest.material
04:09:07: Parsing script NightVision.material
04:09:07: Parsing script Ocean.material
04:09:09: Parsing script OffsetMapping.material
04:09:09: Compiler error: object unsupported by render system in OffsetMapping.material(35): , Shader name: Examples/OffsetMappingPSAsm
04:09:09: Parsing script Ogre.material
04:09:09: Parsing script OldMovie.material
04:09:09: Parsing script OldTV.material
04:09:09: Parsing script ParticleGS.material
04:09:10: Parsing script Penguin.material
04:09:10: Parsing script Posterize.material
04:09:10: Parsing script pssm.material
04:09:10: Parsing script RadialBlur.material
04:09:10: Parsing script RasterizationOrder.material
04:09:10: Parsing script RZR-002.material
04:09:10: Parsing script ShaderInstancing.material
04:09:10: Parsing script ShaderSystem.material
04:09:10: Parsing script shadows.material
04:09:11: Parsing script SharpenEdges.material
04:09:11: Parsing script sibenik.material
04:09:11: Parsing script smoke.material
04:09:11: Parsing script Tesselation.material
04:09:11: Parsing script Tiling.material
04:09:11: Parsing script VarianceShadowmap.material
04:09:11: Parsing script VTFInstancing.material
04:09:11: Parsing script deferreddemo.material
04:09:11: Parsing script deferred_post.material
04:09:12: Parsing script deferred_post_minilight.material
04:09:12: Parsing script ShadowCaster.material
04:09:12: Parsing script ssao.material
04:09:12: Parsing script ROOM.material
04:09:12: Parsing script DualQuaternionSkinning_Shadow.material
04:09:13: Parsing script HardwareSkinningShadow.material
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called worldMatrix does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(206): setting of constant failed
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called viewProjMatrix does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(207): setting of constant failed
04:09:14: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/RTShader/shadow_receiver_ps: The compile returned an error.
(0) : error C3001: no program defined
 in CgProgram::compileMicrocode at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
04:09:14: High-level program Ogre/RTShader/shadow_receiver_ps encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/RTShader/shadow_receiver_ps: The compile returned an error.
(0) : error C3001: no program defined
 in CgProgram::compileMicrocode at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1627)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(219): setting of constant failed
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called texViewProjMatrix0 does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(239): setting of constant failed
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called texViewProjMatrix1 does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(240): setting of constant failed
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called texViewProjMatrix2 does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(241): setting of constant failed
04:09:14: Parsing script RTShaderSystem.material
04:09:14: Compiler error: unknown error in RTShaderSystem.material(23): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(52): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(110): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(146): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(162): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(110): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(211): token "rtshader_system" is not recognized
04:09:14: Parsing script TriplanarTexturing.material
04:09:14: Compiler error: unknown error in TriplanarTexturing.material(9): token "rtshader_system" is not recognized
04:09:14: Parsing script ROOM.material
04:09:14: Parsing script CreaseShading.material
04:09:14: Parsing script Crytek.material
04:09:14: Parsing script GBuffer.material
04:09:14: Parsing script HemisphereMC.material
04:09:14: Parsing script HorizonBased.material
04:09:14: Parsing script Modulate.material
04:09:14: Parsing script ShowDepth.material
04:09:14: Parsing script ShowNormals.material
04:09:14: Parsing script ShowViewPos.material
04:09:14: Parsing script SSAOPost.material
04:09:15: Parsing script UnsharpMask.material
04:09:15: Parsing script Volumetric.material
04:09:15: Parsing script triplanarReference.material
04:09:15: Parsing script RomanBath.material
04:09:15: Parsing script Sinbad.material
04:09:15: Parsing script emitted_emitter.particle
04:09:15: Parsing script Examples-Water.particle
04:09:16: Parsing script Examples.particle
04:09:16: Parsing script smoke.particle
04:09:16: Parsing script Examples.compositor
04:09:16: Parsing script deferred.compositor
04:09:17: Parsing script ssao.compositor
04:09:17: Parsing script SSAO.compositor
04:09:17: Parsing script SSAOPost.compositor
04:09:17: Finished parsing scripts for resource group Popular
04:09:17: Creating resources for group Popular
04:09:17: All done
04:09:17: Parsing scripts for resource group Tests
04:09:17: Finished parsing scripts for resource group Tests
04:09:17: Creating resources for group Tests
04:09:17: All done
04:09:17: *** Initializing OIS ***

(由于字符限制,当事情似乎触及粉丝,并在文件末尾结束时开始。)

1 个答案:

答案 0 :(得分:1)

听起来你没有正确初始化Ogre :: OverlaySystem。请参阅以下从Ogre 1.9 Porting Notes

获取的代码段
Ogre::OverlaySystem* pOverlaySystem = new Ogre::OverlaySystem();
m_pSceneMgr->addRenderQueueListener(pOverlaySystem);