List iterator not incrementable(MyGui related)[SOLVED]

Blender2Ogre

16-07-2012 22:59:04

hello everyone ,
i've been trying to implement the render system switch on runtime for a while and im almost successful with that but..something really weird is going on,i first successfully implemented that by using F1 to switch to directx and F2 button to switch it to the Opengl renderer, however im currently learning MyGui so i wanted to achieve that result by clicking on radio buttons so depending on which button the user clicks, it will switch to the selected render system...but then when i click on it..it quits the current window and then it loads again in another window but when its almost done i get the List iterator not incrementable, i thought that it would have something to do with the debug level and then i tried to disable that in 2 different ways by changing in the project properties to Debug= no; and also through #define method(#define _HAS_ITERATOR_DEBUGGING 0) but none of them seemed to solve the problem..i am not sure if the problem is related to Mygui or not but i suspect it is..ok ill post the ogre log,a picture of the error and my entire code for better analyzis...
Ogre Log :

10:59:46: Creating resource group General
10:59:46: Creating resource group Internal
10:59:46: Creating resource group Autodetect
10:59:46: SceneManagerFactory for type 'DefaultSceneManager' registered.
10:59:46: Registering ResourceManager for type Material
10:59:46: Registering ResourceManager for type Mesh
10:59:46: Registering ResourceManager for type Skeleton
10:59:46: MovableObjectFactory for type 'ParticleSystem' registered.
10:59:46: OverlayElementFactory for type Panel registered.
10:59:46: OverlayElementFactory for type BorderPanel registered.
10:59:46: OverlayElementFactory for type TextArea registered.
10:59:46: Registering ResourceManager for type Font
10:59:46: ArchiveFactory for archive type FileSystem registered.
10:59:46: ArchiveFactory for archive type Zip registered.
10:59:46: DDS codec registering
10:59:46: FreeImage version: 3.15.1
10:59:46: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
10:59:46: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,sti
10:59:46: Registering ResourceManager for type HighLevelGpuProgram
10:59:46: Registering ResourceManager for type Compositor
10:59:46: MovableObjectFactory for type 'Entity' registered.
10:59:46: MovableObjectFactory for type 'Light' registered.
10:59:46: MovableObjectFactory for type 'BillboardSet' registered.
10:59:46: MovableObjectFactory for type 'ManualObject' registered.
10:59:46: MovableObjectFactory for type 'BillboardChain' registered.
10:59:46: MovableObjectFactory for type 'RibbonTrail' registered.
10:59:46: Loading library .\RenderSystem_Direct3D9_d
10:59:46: Installing plugin: D3D9 RenderSystem
10:59:46: D3D9 : Direct3D9 Rendering Subsystem created.
10:59:46: D3D9: Driver Detection Starts
10:59:46: D3D9: Driver Detection Ends
10:59:46: Plugin successfully installed
10:59:46: Loading library .\RenderSystem_GL_d
10:59:46: Installing plugin: GL RenderSystem
10:59:46: OpenGL Rendering Subsystem created.
10:59:46: Plugin successfully installed
10:59:46: Loading library .\Plugin_ParticleFX_d
10:59:46: Installing plugin: ParticleFX
10:59:46: Particle Emitter Type 'Point' registered
10:59:46: Particle Emitter Type 'Box' registered
10:59:46: Particle Emitter Type 'Ellipsoid' registered
10:59:46: Particle Emitter Type 'Cylinder' registered
10:59:46: Particle Emitter Type 'Ring' registered
10:59:46: Particle Emitter Type 'HollowEllipsoid' registered
10:59:46: Particle Affector Type 'LinearForce' registered
10:59:46: Particle Affector Type 'ColourFader' registered
10:59:46: Particle Affector Type 'ColourFader2' registered
10:59:46: Particle Affector Type 'ColourImage' registered
10:59:46: Particle Affector Type 'ColourInterpolator' registered
10:59:46: Particle Affector Type 'Scaler' registered
10:59:46: Particle Affector Type 'Rotator' registered
10:59:46: Particle Affector Type 'DirectionRandomiser' registered
10:59:46: Particle Affector Type 'DeflectorPlane' registered
10:59:46: Plugin successfully installed
10:59:46: Loading library .\Plugin_BSPSceneManager_d
10:59:46: Installing plugin: BSP Scene Manager
10:59:46: Plugin successfully installed
10:59:46: Loading library .\Plugin_CgProgramManager_d
10:59:46: Installing plugin: Cg Program Manager
10:59:46: Plugin successfully installed
10:59:46: Loading library .\Plugin_PCZSceneManager_d
10:59:46: Installing plugin: Portal Connected Zone Scene Manager
10:59:46: PCZone Factory Type 'ZoneType_Default' registered
10:59:46: Plugin successfully installed
10:59:46: Loading library .\Plugin_OctreeZone_d
10:59:46: Installing plugin: Octree Zone Factory
10:59:46: Plugin successfully installed
10:59:46: Loading library .\Plugin_OctreeSceneManager_d
10:59:46: Installing plugin: Octree & Terrain Scene Manager
10:59:46: Plugin successfully installed
10:59:46: *-*-* OGRE Initialising
10:59:46: *-*-* Version 1.7.4 (Cthugha)
10:59:46: CPU Identifier & Features
10:59:46: -------------------------
10:59:46: * CPU ID: GenuineIntel: Intel(R) Core(TM) i5 CPU M 460 @ 2.53GHz
10:59:46: * SSE: yes
10:59:46: * SSE2: yes
10:59:46: * SSE3: yes
10:59:46: * MMX: yes
10:59:46: * MMXEXT: yes
10:59:46: * 3DNOW: no
10:59:46: * 3DNOWEXT: no
10:59:46: * CMOV: yes
10:59:46: * TSC: yes
10:59:46: * FPU: yes
10:59:46: * PRO: yes
10:59:46: * HT: no
10:59:46: -------------------------
10:59:46: D3D9 : Subsystem Initialising
10:59:46: Registering ResourceManager for type Texture
10:59:46: Registering ResourceManager for type GpuProgram
10:59:46: ***************************************
10:59:46: *** D3D9 : Subsystem Initialised OK ***
10:59:46: ***************************************
10:59:46: D3D9 : Created D3D9 Rendering Window 'Main Wnd' : 1024x690, 32bpp
10:59:46: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
10:59:46: D3D9: Vertex texture format supported - PF_L8
10:59:46: D3D9: Vertex texture format supported - PF_L16
10:59:46: D3D9: Vertex texture format supported - PF_A8
10:59:46: D3D9: Vertex texture format supported - PF_A4L4
10:59:46: D3D9: Vertex texture format supported - PF_BYTE_LA
10:59:46: D3D9: Vertex texture format supported - PF_R5G6B5
10:59:46: D3D9: Vertex texture format supported - PF_B5G6R5
10:59:46: D3D9: Vertex texture format supported - PF_A4R4G4B4
10:59:46: D3D9: Vertex texture format supported - PF_A1R5G5B5
10:59:46: D3D9: Vertex texture format supported - PF_A8R8G8B8
10:59:46: D3D9: Vertex texture format supported - PF_B8G8R8A8
10:59:46: D3D9: Vertex texture format supported - PF_A2R10G10B10
10:59:46: D3D9: Vertex texture format supported - PF_A2B10G10R10
10:59:46: D3D9: Vertex texture format supported - PF_DXT1
10:59:46: D3D9: Vertex texture format supported - PF_DXT2
10:59:46: D3D9: Vertex texture format supported - PF_DXT3
10:59:46: D3D9: Vertex texture format supported - PF_DXT4
10:59:46: D3D9: Vertex texture format supported - PF_DXT5
10:59:46: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
10:59:46: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
10:59:46: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
10:59:46: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
10:59:46: D3D9: Vertex texture format supported - PF_X8R8G8B8
10:59:46: D3D9: Vertex texture format supported - PF_R8G8B8A8
10:59:47: D3D9: Vertex texture format supported - PF_DEPTH
10:59:47: D3D9: Vertex texture format supported - PF_SHORT_RGBA
10:59:47: D3D9: Vertex texture format supported - PF_FLOAT16_R
10:59:47: D3D9: Vertex texture format supported - PF_FLOAT32_R
10:59:47: D3D9: Vertex texture format supported - PF_SHORT_GR
10:59:47: D3D9: Vertex texture format supported - PF_FLOAT16_GR
10:59:47: D3D9: Vertex texture format supported - PF_FLOAT32_GR
10:59:47: D3D9: Vertex texture format supported - PF_SHORT_RGB
10:59:47: D3D9: Vertex texture format supported - PF_PVRTC_RGB2
10:59:47: D3D9: Vertex texture format supported - PF_PVRTC_RGBA2
10:59:47: D3D9: Vertex texture format supported - PF_PVRTC_RGB4
10:59:47: D3D9: Vertex texture format supported - PF_PVRTC_RGBA4
10:59:47: RenderSystem capabilities
10:59:47: -------------------------
10:59:47: RenderSystem Name: Direct3D9 Rendering Subsystem
10:59:47: GPU Vendor: intel
10:59:47: Device Name: Monitor-1-Intel(R) HD Graphics
10:59:47: Driver Version: 8.15.10.2622
10:59:47: * Fixed function pipeline: yes
10:59:47: * Hardware generation of mipmaps: yes
10:59:47: * Texture blending: yes
10:59:47: * Anisotropic texture filtering: yes
10:59:47: * Dot product texture operation: yes
10:59:47: * Cube mapping: yes
10:59:47: * Hardware stencil buffer: yes
10:59:47: - Stencil depth: 8
10:59:47: - Two sided stencil support: yes
10:59:47: - Wrap stencil values: yes
10:59:47: * Hardware vertex / index buffers: yes
10:59:47: * Vertex programs: yes
10:59:47: * Number of floating-point constants for vertex programs: 256
10:59:47: * Number of integer constants for vertex programs: 16
10:59:47: * Number of boolean constants for vertex programs: 16
10:59:47: * Fragment programs: yes
10:59:47: * Number of floating-point constants for fragment programs: 224
10:59:47: * Number of integer constants for fragment programs: 16
10:59:47: * Number of boolean constants for fragment programs: 16
10:59:47: * Geometry programs: no
10:59:47: * Number of floating-point constants for geometry programs: 0
10:59:47: * Number of integer constants for geometry programs: 20408
10:59:47: * Number of boolean constants for geometry programs: 216
10:59:47: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
10:59:47: * Texture Compression: yes
10:59:47: - DXT: yes
10:59:47: - VTC: no
10:59:47: - PVRTC: no
10:59:47: * Scissor Rectangle: yes
10:59:47: * Hardware Occlusion Query: yes
10:59:47: * User clip planes: yes
10:59:47: * VET_UBYTE4 vertex element type: yes
10:59:47: * Infinite far plane projection: yes
10:59:47: * Hardware render-to-texture: yes
10:59:47: * Floating point textures: yes
10:59:47: * Non-power-of-two textures: yes
10:59:47: * Volume textures: yes
10:59:47: * Multiple Render Targets: 4
10:59:47: - With different bit depths: yes
10:59:47: * Point Sprites: yes
10:59:47: * Extended point parameters: yes
10:59:47: * Max Point Size: 10
10:59:47: * Vertex texture fetch: yes
10:59:47: * Number of world matrices: 0
10:59:47: * Number of texture units: 8
10:59:47: * Stencil buffer depth: 8
10:59:47: * Number of vertex blend matrices: 0
10:59:47: - Max vertex textures: 4
10:59:47: - Vertex textures shared: no
10:59:47: * Render to Vertex Buffer : no
10:59:47: * DirectX per stage constants: yes
10:59:47: DefaultWorkQueue('Root') initialising on thread 0066B8E0.
10:59:47: DefaultWorkQueue('Root')::WorkerFunc - thread 05C2F198 starting.
10:59:47: DefaultWorkQueue('Root')::WorkerFunc - thread 08851DE8 starting.
10:59:47: Particle Renderer Type 'billboard' registered
10:59:47: DefaultWorkQueue('Root')::WorkerFunc - thread 04928070 starting.
10:59:47: DefaultWorkQueue('Root')::WorkerFunc - thread 0066C088 starting.
10:59:47: SceneManagerFactory for type 'BspSceneManager' registered.
10:59:47: Registering ResourceManager for type BspLevel
10:59:47: SceneManagerFactory for type 'PCZSceneManager' registered.
10:59:47: MovableObjectFactory for type 'PCZLight' registered.
10:59:47: MovableObjectFactory for type 'Portal' registered.
10:59:47: MovableObjectFactory for type 'AntiPortal' registered.
10:59:47: PCZone Factory Type 'ZoneType_Octree' registered
10:59:47: PCZone Factory Type 'ZoneType_Terrain' registered
10:59:47: SceneManagerFactory for type 'OctreeSceneManager' registered.
10:59:47: SceneManagerFactory for type 'TerrainSceneManager' registered.
10:59:47: Current Render System: Direct3D9 Rendering Subsystem
10:59:47: Creating resource group Essential
10:59:47: Added resource location '../../media/thumbnails' of type 'FileSystem' to resource group 'Essential'
10:59:47: Added resource location '../../media/packs/SdkTrays.zip' of type 'Zip' to resource group 'Essential'
10:59:47: Creating resource group Fonts
10:59:47: Added resource location 'C:\CEGUI-0.7.6\datafiles\fonts' of type 'FileSystem' to resource group 'Fonts'
10:59:47: Added resource location '../../media' of type 'FileSystem' to resource group 'General'
10:59:47: Added resource location 'C:\OgreSDK_vc10_v1-7-4\MyGUI\MyGUI_3.2.0\Media' of type 'FileSystem' to resource group 'General'
10:59:47: Added resource location 'C:\OgreSDK_vc10_v1-7-4\MyGUI\MyGUI_3.2.0\Media\MyGUI_Media' of type 'FileSystem' to resource group 'General'
10:59:47: Added resource location 'C:\OgreMeshy\Resources' of type 'FileSystem' to resource group 'General'
10:59:47: Creating resource group Imagesets
10:59:47: Added resource location 'C:\CEGUI-0.7.6\datafiles\imagesets' of type 'FileSystem' to resource group 'Imagesets'
10:59:47: Creating resource group Layouts
10:59:47: Added resource location 'C:\CEGUI-0.7.6\datafiles\layouts' of type 'FileSystem' to resource group 'Layouts'
10:59:47: Creating resource group LookNFeel
10:59:47: Added resource location 'C:\CEGUI-0.7.6\datafiles\looknfeel' of type 'FileSystem' to resource group 'LookNFeel'
10:59:47: Added resource location 'C:\CEGUI-0.7.6\datafiles\Mylooknfeel' of type 'FileSystem' to resource group 'LookNFeel'
10:59:47: Creating resource group Popular
10:59:47: Added resource location '../../media/fonts' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/materials/programs' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/materials/scripts' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/materials/textures' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/materials/textures/nvidia' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/models' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/particle' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/DeferredShadingMedia' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/PCZAppMedia' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/RTShaderLib' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/RTShaderLib/materials' of type 'FileSystem' to resource group 'Popular'
10:59:47: Added resource location '../../media/packs/cubemap.zip' of type 'Zip' to resource group 'Popular'
10:59:47: Added resource location '../../media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'Popular'
10:59:47: Added resource location '../../media/packs/dragon.zip' of type 'Zip' to resource group 'Popular'
10:59:48: Added resource location '../../media/packs/fresneldemo.zip' of type 'Zip' to resource group 'Popular'
10:59:48: Added resource location '../../media/packs/ogretestmap.zip' of type 'Zip' to resource group 'Popular'
10:59:48: Added resource location '../../media/packs/ogredance.zip' of type 'Zip' to resource group 'Popular'
10:59:48: Added resource location '../../media/packs/Sinbad.zip' of type 'Zip' to resource group 'Popular'
10:59:48: Added resource location '../../media/packs/skybox.zip' of type 'Zip' to resource group 'Popular'
10:59:48: Creating resource group Schemes
10:59:48: Added resource location 'C:\CEGUI-0.7.6\datafiles\schemes' of type 'FileSystem' to resource group 'Schemes'
10:59:48: Creating resource group lua_scripts
10:59:48: Added resource location 'C:\CEGUI-0.7.6\datafiles\lua_scripts' of type 'FileSystem' to resource group 'lua_scripts'
10:59:48: Creating resource group xml_schemas
10:59:48: Added resource location 'C:\CEGUI-0.7.6\datafiles\xml_schemas' of type 'FileSystem' to resource group 'xml_schemas'
10:59:48: Parsing scripts for resource group Autodetect
10:59:48: Finished parsing scripts for resource group Autodetect
10:59:48: Parsing scripts for resource group Essential
10:59:48: Parsing script SdkTrays.material
10:59:48: Parsing script SdkTrays.fontdef
10:59:48: Parsing script SdkTrays.overlay
10:59:48: Bad element attribute line: '# you can offset the image to change the cursor "hotspot"' for element SdkTrays/Cursor in overlay
10:59:48: Texture: sdk_cursor.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
10:59:48: Texture: sdk_tray.png: Loading 1 faces(PF_A8R8G8B8,64x64x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x64x1.
10:59:48: Texture: sdk_button_up.png: Loading 1 faces(PF_A8R8G8B8,128x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x32x1.
10:59:48: Texture: sdk_text_box.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
10:59:48: Texture: sdk_mini_tray.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
10:59:48: Texture: sdk_track.png: Loading 1 faces(PF_A8R8G8B8,16x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,16x32x1.
10:59:48: Texture: sdk_handle.png: Loading 1 faces(PF_A8R8G8B8,16x16x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,16x16x1.
10:59:48: Texture: sdk_mini_text_box.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
10:59:48: Texture: sdk_label.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
10:59:48: Texture: sdk_separator.png: Loading 1 faces(PF_A8R8G8B8,64x16x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x16x1.
10:59:48: Texture: sdk_logo.png: Loading 1 faces(PF_A8R8G8B8,128x64x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x64x1.
10:59:48: Texture: sdk_shade.png: Loading 1 faces(PF_A8R8G8B8,64x48x1) with 6 generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x48x1.
10:59:48: Texture: sdk_frame.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
10:59:48: Texture: sdk_mini_text_box_over.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
10:59:48: Texture: sdk_pulse.png: Loading 1 faces(PF_R8G8B8,8x1x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,8x1x1.
10:59:48: Finished parsing scripts for resource group Essential
10:59:48: Parsing scripts for resource group Fonts
10:59:48: Finished parsing scripts for resource group Fonts
10:59:48: Parsing scripts for resource group General
10:59:48: Finished parsing scripts for resource group General
10:59:48: Parsing scripts for resource group Imagesets
10:59:48: Finished parsing scripts for resource group Imagesets
10:59:48: Parsing scripts for resource group Internal
10:59:48: Finished parsing scripts for resource group Internal
10:59:48: Parsing scripts for resource group Layouts
10:59:48: Finished parsing scripts for resource group Layouts
10:59:48: Parsing scripts for resource group LookNFeel
10:59:48: Finished parsing scripts for resource group LookNFeel
10:59:48: Parsing scripts for resource group Popular
10:59:48: Parsing script Examples.program
10:59:48: Parsing script StdQuad_vp.program
10:59:48: Parsing script deferred_post.program
10:59:48: Parsing script ShadowCaster.program
10:59:49: Parsing script ASCII.material
10:59:49: Parsing script ASMSwizzle.material
10:59:49: Compiler error: object unsupported by render system in ASMSwizzle.material(1)
10:59:49: Parsing script BlackAndWhite.material
10:59:49: Parsing script Bloom.material
10:59:49: Parsing script Bloom2.material
10:59:49: Parsing script CGSwizzle.material
10:59:49: Parsing script CompositorDemo.material
10:59:49: Parsing script DepthShadowmap.material
10:59:49: Parsing script Dither.material
10:59:49: Parsing script DOF.material
10:59:49: OGRE EXCEPTION(7:InternalErrorException): Unable to find CG profile enum for program DOF_Blend_ps: The parameter used is invalid. in CgProgram::selectProfile at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
10:59:49: High-level program DOF_Blend_ps encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to find CG profile enum for program DOF_Blend_ps: The parameter used is invalid. in CgProgram::selectProfile at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
10:59:49: Parsing script Embossed.material
10:59:49: Parsing script Example-Water.material
10:59:49: Parsing script Examples-Advanced.material
10:59:50: Parsing script Examples-DynTex.material
10:59:50: Parsing script Examples-Water.material
10:59:50: Parsing script Examples.material
10:59:51: OGRE EXCEPTION(2:InvalidParametersException): Parameter called camObjPos does not exist. in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1435)
10:59:51: Compiler error: invalid parameters in Examples.material(837): setting of constant failed
10:59:51: Parsing script facial.material
10:59:51: Parsing script Glass.material
10:59:51: Parsing script GLSLSwizzle.material
10:59:51: Parsing script Halftone.material
10:59:51: Parsing script hdr.material
10:59:52: Parsing script HeatVision.material
10:59:52: Parsing script Hurt.material
10:59:52: Parsing script instancing.material
10:59:52: Parsing script Invert.material
10:59:52: Parsing script IsoSurf.material
10:59:52: Parsing script Laplace.material
10:59:52: Parsing script MotionBlur.material
10:59:52: Parsing script MRTtest.material
10:59:52: Parsing script NightVision.material
10:59:52: Parsing script Ocean.material
10:59:53: Parsing script OffsetMapping.material
10:59:53: Parsing script Ogre.material
10:59:53: Parsing script OldMovie.material
10:59:53: Parsing script OldTV.material
10:59:53: Parsing script ParticleGS.material
10:59:53: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: The compile returned an error.
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
10:59:53: High-level program Ogre/ParticleGS/GenerateVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: The compile returned an error.
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
10:59:53: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: The compile returned an error.
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
10:59:53: High-level program Ogre/ParticleGS/DisplayVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: The compile returned an error.
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
10:59:53: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: The compile returned an error.
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
10:59:53: High-level program Ogre/ParticleGS/DisplayPS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: The compile returned an error.
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
10:59:53: Parsing script Penguin.material
10:59:53: Parsing script Posterize.material
10:59:53: Parsing script pssm.material
10:59:53: Parsing script RadialBlur.material
10:59:53: Parsing script RZR-002.material
10:59:53: Parsing script ShaderSystem.material
10:59:53: Parsing script shadows.material
10:59:53: Parsing script SharpenEdges.material
10:59:53: Parsing script sibenik.material
10:59:54: Parsing script smoke.material
10:59:54: Parsing script Tiling.material
10:59:54: Parsing script VarianceShadowmap.material
10:59:54: Parsing script Examples.material
10:59:55: OGRE EXCEPTION(2:InvalidParametersException): Parameter called camObjPos does not exist. in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1435)
10:59:55: Compiler error: invalid parameters in Examples.material(837): setting of constant failed
10:59:55: Parsing script Scene.material
10:59:55: Parsing script deferreddemo.material
10:59:55: Parsing script deferred_post.material
10:59:55: Parsing script deferred_post_minilight.material
10:59:55: Parsing script ShadowCaster.material
10:59:55: Parsing script ssao.material
10:59:55: Parsing script ROOM.material
10:59:55: Parsing script RTShaderSystem.material
10:59:56: Compiler error: unknown error in RTShaderSystem.material(23): token "rtshader_system" is not recognized
10:59:56: Compiler error: unknown error in RTShaderSystem.material(52): token "rtshader_system" is not recognized
10:59:56: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
10:59:56: Compiler error: unknown error in RTShaderSystem.material(110): token "rtshader_system" is not recognized
10:59:56: Compiler error: unknown error in RTShaderSystem.material(146): token "rtshader_system" is not recognized
10:59:56: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
10:59:56: Compiler error: unknown error in RTShaderSystem.material(162): token "rtshader_system" is not recognized
10:59:56: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
10:59:56: Compiler error: unknown error in RTShaderSystem.material(110): token "rtshader_system" is not recognized
10:59:56: Parsing script RomanBath.material
10:59:56: Parsing script Sinbad.material
10:59:56: Parsing script emitted_emitter.particle
10:59:56: Parsing script Examples-Water.particle
10:59:56: Parsing script Examples.particle
10:59:56: Parsing script smoke.particle
10:59:56: Parsing script Examples.compositor
10:59:56: Parsing script deferred.compositor
10:59:56: Parsing script ssao.compositor
10:59:57: Parsing script sample.fontdef
10:59:57: Finished parsing scripts for resource group Popular
10:59:57: Parsing scripts for resource group Schemes
10:59:57: Finished parsing scripts for resource group Schemes
10:59:57: Parsing scripts for resource group lua_scripts
10:59:57: Finished parsing scripts for resource group lua_scripts
10:59:57: Parsing scripts for resource group xml_schemas
10:59:57: Finished parsing scripts for resource group xml_schemas
10:59:57: Texture: MyGUI_BlueWhiteSkins.png: Loading 1 faces(PF_A8R8G8B8,512x256x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,512x256x1.
10:59:58: Texture: MyGUI_Pointers.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
10:59:58: Mesh: Loading ogrehead.mesh.
10:59:58: Texture: GreenSkin.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
10:59:58: Texture: spheremap.png: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
10:59:58: Texture: tusk.jpg: Loading 1 faces(PF_R8G8B8,96x96x1) with 6 generated mipmaps from Image. Internal format is PF_X8R8G8B8,96x96x1.
10:59:58: Texture: clouds.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.

the main.h header file :
#ifndef MAIN_H
#define MAIN_H
#include <Ogre.h>
#include <OIS.h>
#include "MyGUI.h"
#include "MyGUI_OgrePlatform.h"
class ProperOgreApp : public OIS::KeyListener, public OIS::MouseListener
{
public:
ProperOgreApp();
~ProperOgreApp();

bool initOgre(bool shouldChangeRS, Ogre::String rsName);
void initInput();
void createScene();
void onUpdate();
void windowResized(Ogre::RenderWindow* rw);
bool keyPressed(const OIS::KeyEvent& arg);
bool keyReleased(const OIS::KeyEvent& arg);
bool mouseMoved(const OIS::MouseEvent& arg);
bool mousePressed(const OIS::MouseEvent& arg, OIS::MouseButtonID id);
bool mouseReleased(const OIS::MouseEvent& arg, OIS::MouseButtonID id);
void quit(MyGUI::WidgetPtr button);
void OpenGL(MyGUI::WidgetPtr buttonGL);
void DirectX(MyGUI::WidgetPtr buttonDX);
void notifyWindowPressedMyGUI(MyGUI::WindowPtr _widget, const std::string& _name);
bool render();
void destroy();
private:
Ogre::Root* mRoot;
Ogre::RenderWindow* mWindow;
Ogre::SceneManager* sceneMgr;
Ogre::Camera* cam;
Ogre::String mResourcesCfg;
Ogre::String mPluginsCfg;
OIS::Keyboard* mKeyboard;
OIS::Mouse* mMouse;
OIS::InputManager* mInputMgr;
MyGUI::Gui* mGUI;
MyGUI::OgrePlatform* mPlatform;
/*int mFrameCount;*/

Ogre::SceneNode* node;



};
#endif


the main.cpp file:
#include <iostream>
#include "main.h"


ProperOgreApp::ProperOgreApp()
:mRoot(0),
cam(0),
sceneMgr(0),
mWindow(0),
mResourcesCfg(Ogre::StringUtil::BLANK),
mPluginsCfg(Ogre::StringUtil::BLANK),
mInputMgr(0),
mMouse(0),
mKeyboard(0)
{
}
ProperOgreApp::~ProperOgreApp()
{

}
bool ProperOgreApp::initOgre(bool shouldChangeRS = false, Ogre::String rsName = "")
{
if (shouldChangeRS && rsName.length() == NULL)
std::cout << "WHAT THE HECK ARE YOU DOING ? \n";
mRoot = new Ogre::Root("plugins_d.cfg");
if (!shouldChangeRS && rsName.length() == NULL)
{
bool shouldContinue = (mRoot->showConfigDialog() || mRoot->restoreConfig());
if (!shouldContinue)
return false;
mRoot->initialise(false);
mWindow = mRoot->createRenderWindow("Main Wnd", 1024, 768, false);

}
else if (shouldChangeRS && rsName.length() != NULL)
{
// Restores configuration from saved state
// Returns true if a valid saved configuration is
// available, and false if no saved config is
// stored, or if there has been a problem
Ogre::ConfigFile cfg;
try
{
// Don't trim whitespace
cfg.load("ogre.cfg", "\t:=", false);
}
catch (Ogre::Exception& e)
{
if (e.getNumber() == Ogre::Exception::ERR_FILE_NOT_FOUND)
{
return false;
}
else
{
throw;
}
}
Ogre::ConfigFile::SectionIterator iSection = cfg.getSectionIterator();
Ogre::RenderSystem* rs = mRoot->getRenderSystemByName(rsName);
while (iSection.hasMoreElements())
{
const Ogre::String& renderSystem = iSection.peekNextKey();
const Ogre::ConfigFile::SettingsMultiMap& settings = *iSection.getNext();
if (!rs)
{
// Unrecognised render system
continue;
}
Ogre::ConfigFile::SettingsMultiMap::const_iterator i;
for (i = settings.begin(); i != settings.end(); ++i)
{

mRoot->setRenderSystem(rs);

}
}
if (!rs)
{
// Unrecognised render system
return false;
}
/*Ogre::String err = rs->validateConfigOptions();
if (err.length() > 0)
return false;*/
mRoot->setRenderSystem(rs);
mRoot->initialise(false);
mWindow = mRoot->createRenderWindow("Main Wnd", 1024, 768, false);
}
Ogre::LogManager::getSingleton().getDefaultLog()->logMessage("Current Render System: " + mRoot->getRenderSystem()->getName());
return true;
}
void ProperOgreApp::initInput()
{
OIS::ParamList pl;
size_t windowHnd = 0;
std::ostringstream windowHndStr;
mWindow->getCustomAttribute("WINDOW", &windowHnd);
windowHndStr << windowHnd;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
mInputMgr = OIS::InputManager::createInputSystem(pl);
mKeyboard = static_cast<OIS::Keyboard*>(mInputMgr->createInputObject(OIS::OISKeyboard, false));
mMouse = static_cast<OIS::Mouse*>(mInputMgr->createInputObject( OIS::OISMouse, true ));
mMouse->setEventCallback(this);
mKeyboard->setEventCallback(this);
}
void ProperOgreApp::createScene()
{
sceneMgr = mRoot->createSceneManager(Ogre::ST_GENERIC, "Mgr");
cam = sceneMgr->createCamera("main Cam");
Ogre::Viewport* vp = mWindow->addViewport(cam);
cam->setAspectRatio(Ogre::Real(vp->getActualWidth()) / Ogre::Real(vp->getActualHeight()));
cam->setPosition(0, 0, 300);
cam->lookAt(0, 0, -300);
// Load resources
// Load resource paths from config file
Ogre::ConfigFile cf;
cf.load("resources_d.cfg");
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
mPlatform = new MyGUI::OgrePlatform();
mPlatform->initialise(mWindow,sceneMgr);
mGUI = new MyGUI::Gui();
mGUI->initialise("MyGUI_Core.xml");
windowResized(mWindow);
MyGUI::ButtonPtr button = mGUI->createWidget<MyGUI::Button>("Button", 10, 10, 120, 26, MyGUI::Align::Default, "Main");
button->setCaption("Exit Game");
button->eventMouseButtonClick += MyGUI::newDelegate(this, &ProperOgreApp::quit);
MyGUI::WindowPtr window = mGUI->createWidget<MyGUI::Window>("WindowCSX", 300, 0, 390, 300, MyGUI::Align::Default, "Overlapped");
window->setCaption("3D Graphics Settings");
window->setMovable(false);
window->setSize(390,400);
window->setMaxSize(390,400);
window->setMinSize(390,400);
window->eventWindowButtonPressed += MyGUI::newDelegate(this, &ProperOgreApp::notifyWindowPressedMyGUI);
MyGUI::ButtonPtr Radio = window->createWidget<MyGUI::Button>("RadioButton" , 45, 25, 20, 20, MyGUI::Align::Default, "SharedLayer");
Radio->eventMouseButtonClick += MyGUI::newDelegate(this, &ProperOgreApp::DirectX);
MyGUI::TextBox* text = window->createWidget<MyGUI::TextBox>("TextBox", 30, 05, 70, 15, MyGUI::Align::Default, "Main");
text->setCaption("#ffffffDirectX");
text->setTextShadow(true);
MyGUI::ButtonPtr Radio2 = window->createWidget<MyGUI::Button>("RadioButton" , 310, 25, 20, 20, MyGUI::Align::Default, "SharedLayer");
Radio2->eventMouseButtonClick += MyGUI::newDelegate(this, &ProperOgreApp::OpenGL);

MyGUI::TextBox* text2 = window->createWidget<MyGUI::TextBox>("TextBox", 295, 05, 70, 15, MyGUI::Align::Default, "Main");
text2->setCaption("#ffffffOpenGL");
text2->setTextShadow(true);
MyGUI::PopupMenu* w = mGUI->createWidget<MyGUI::PopupMenu>("PopupMenu", 800, 0, 300, 143, MyGUI::Align::Default, "Main");
w->addItem("#ffffffExpandable Item >", MyGUI::MenuItemType::Popup);
MyGUI::MenuCtrl* child = w->createItemChildAt(0);
child->addItem("Common Item");
child->addItem("Expandable Item", MyGUI::MenuItemType::Popup);
MyGUI::MenuCtrl* child2 = child->createItemChildAt(1);
child2->addItem("Common Item");



// Create scene
Ogre::SceneNode* node = sceneMgr->getRootSceneNode()->createChildSceneNode("headNode");
Ogre::Entity* ent = sceneMgr->createEntity("headEntity", "ogrehead.mesh");
node->attachObject(ent);
sceneMgr->setAmbientLight(Ogre::ColourValue(1, 1, 1));
sceneMgr->setSkyDome(true, "Examples/CloudySky", 5, 8);
}
void ProperOgreApp::onUpdate()
{
mMouse->capture();
mKeyboard->capture();
if (mKeyboard->isKeyDown(OIS::KC_F1))
{
destroy();
initOgre(true, "OpenGL Rendering Subsystem");
initInput();
createScene();
}
else if (mKeyboard->isKeyDown(OIS::KC_F2))
{
destroy();
initOgre(true, "Direct3D9 Rendering Subsystem");
initInput();
createScene();
}
}
void ProperOgreApp::windowResized(Ogre::RenderWindow* rw)
{
unsigned int width, height, depth;
int left, top;
rw->getMetrics(width, height, depth, left, top);
const OIS::MouseState &ms = mMouse->getMouseState();
ms.width = width;
ms.height = height;
}
bool ProperOgreApp::keyPressed(const OIS::KeyEvent& arg)
{
MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::Enum(arg.key), arg.text);
return true;
}
bool ProperOgreApp::keyReleased(const OIS::KeyEvent& arg)
{
MyGUI::InputManager::getInstance().injectKeyRelease(MyGUI::KeyCode::Enum(arg.key));
return true;
}
bool ProperOgreApp::mouseMoved(const OIS::MouseEvent& arg)
{
MyGUI::InputManager::getInstance().injectMouseMove(arg.state.X.abs, arg.state.Y.abs, arg.state.Z.abs);
return true;
}
bool ProperOgreApp::mousePressed(const OIS::MouseEvent& arg, OIS::MouseButtonID id)
{
MyGUI::InputManager::getInstance().injectMousePress(arg.state.X.abs, arg.state.Y.abs, MyGUI::MouseButton::Enum(id));
return true;
}
bool ProperOgreApp::mouseReleased(const OIS::MouseEvent& arg, OIS::MouseButtonID id)
{
MyGUI::InputManager::getInstance().injectMouseRelease(arg.state.X.abs, arg.state.Y.abs, MyGUI::MouseButton::Enum(id));
return true;
}
void ProperOgreApp::quit(MyGUI::WidgetPtr button)
{
if(button)
exit(0);
}
void ProperOgreApp::OpenGL(MyGUI::WidgetPtr buttonGL)
{

destroy();
initOgre(true, "OpenGL Rendering Subsystem");
initInput();
createScene();

}
void ProperOgreApp::DirectX(MyGUI::WidgetPtr buttonDX)
{

destroy();
initOgre(true, "Direct3D9 Rendering Subsystem");
initInput();
createScene();

}
void ProperOgreApp::notifyWindowPressedMyGUI(MyGUI::WindowPtr _widget, const std::string& _name)
{
MyGUI::WindowPtr window = _widget->castType<MyGUI::Window>();
if (_name == "close") window->destroySmooth();
else if (_name == "minimized") {
// hide window and show button in your taskbar
}
else if (_name == "maximized") {
// maximized window
}

}
bool ProperOgreApp::render()
{
while(true)
{
// Pump window messages for nice behaviour
Ogre::WindowEventUtilities::messagePump();
onUpdate();
if(mWindow->isClosed())
{
return false;
}
// Render a frame
if(!mRoot->renderOneFrame()) return false;
}
}
void ProperOgreApp::destroy()
{
mInputMgr->destroyInputObject( mMouse );
mInputMgr->destroyInputObject( mKeyboard );
OIS::InputManager::destroyInputSystem(mInputMgr);
mInputMgr = 0;
mGUI->shutdown();
delete mGUI;
mGUI = 0;
mPlatform->shutdown();
delete mPlatform;
mPlatform = 0;
mWindow->destroy();
mWindow = 0;
delete mRoot;


}



int main()
{
ProperOgreApp* app = new ProperOgreApp;
app->initOgre();
app->initInput();
app->createScene();





while(app->render());
app->destroy();

delete app;
return 0;
}

and the image of the error:


Uploaded with ImageShack.us
notice that i still have the F1 and F2 function, when i use that it works perfectly with no errors..and also i have tried to reproduce the same action without mygui by removing all the mygui calls and i added the simple OIS mouse click and it worked ,so its definetly the Mygui and i think it is releated to the handler...the MyGUI::newDelegate..
any help here is greatly appreciated and thanks in advance,
Romulo Romero

Blender2Ogre

17-07-2012 17:11:31

hi everyone,
the solution was posted here :

http://www.ogre3d.org/forums/viewtopic.php?f=2&t=70989

kind regards,
Romulo Romero