Re: [News] Ogre3D now supports Windows Phone 8!
Posted: Thu Nov 15, 2012 8:03 am
I still have some code from Microsoft that I didn't merge - it may be there.
Support and community hang-out spot for Ogre3D
https://forums.ogre3d.org/
Well baisicly I got an ogre window which is there just for initialization reasons (and which doesn't have a handle to an external window, see below), one scene and one camera in it which is set to render to a shared texture (I had to modify ogre a bit for this as well, see below). Then I took the SinbadCharacterController, added the character to the scene, and call addTime method every frame (I use the PhoneXamlDirect3D template structure, but that shouldn't matter). Then after the SinbadCharacterController->addTime call, I also call myRenderTexture-update() every frame. Everything else gets rendered to the texture correctly, but animations only started to play after I changed the myRenderTexture-update() to Ogre::Root::getSingleton().renderOneFrame(timeDelta). Until that, attempts to play an animation only changed the character pose (I think to what it should be at the end of the animation).Assaf Raman wrote:How can I recreate your issue?
Or you could help out the Axiom project to provide a mostly managed solution.Zonder wrote:help the mogre people then you get your managed enviroment. but that depends if windows phone has clrOenone575 wrote:Will there be a C# wrapper or other managed C# interface for the WP8 version of Ogre3D?
The loss of XNA with no inbuilt C# alternative is a real shame in my opinion. Hopefully we'll have MonoGame available for WP8 soon, but it would be great to have other alternatives too and Ogre3D is one that would be superb to have.
so -27. Before you run for the first time make sure you have a shader cache for the project you are running - as you can't compile shader on the phone. (TODO - explain more)
28. In Windows Phone and (Store versions of WinRT) you don't have the shader compiler, meaning you have to use the shader cache, they tricky part is that you need to create the shader cache, to do that, compile OGRE for WinRT and add ENABLE_SHADERS_CACHE_SAVE to the preprocessor definitions in the config, run the project, act out all the use cases you are going to do in the final version, then go to the home directory of the WinRT (I find the home directory by putting a breakpoint in FileSystemLayerImpl_WIN32.cpp line 138) and copy the file cache.bin from the OGRE dir there to Samples\Browser\WinRT.
compile OGRE for WinRT and add ENABLE_SHADERS_CACHE_SAVE
I find the home directory by putting a breakpoint in FileSystemLayerImpl_WIN32.cpp line 138
thx to your response! i had solved it . there was error for my operating. the shader cache files was created must click "Quit" button in game when run the winRT project . i click the stop debugging button everytime. thanks to you.Assaf Raman wrote:BuildingOgreWindowsPhone.txtso -27. Before you run for the first time make sure you have a shader cache for the project you are running - as you can't compile shader on the phone. (TODO - explain more)
28. In Windows Phone and (Store versions of WinRT) you don't have the shader compiler, meaning you have to use the shader cache, they tricky part is that you need to create the shader cache, to do that, compile OGRE for WinRT and add ENABLE_SHADERS_CACHE_SAVE to the preprocessor definitions in the config, run the project, act out all the use cases you are going to do in the final version, then go to the home directory of the WinRT (I find the home directory by putting a breakpoint in FileSystemLayerImpl_WIN32.cpp line 138) and copy the file cache.bin from the OGRE dir there to Samples\Browser\WinRT.compile OGRE for WinRT and add ENABLE_SHADERS_CACHE_SAVEI find the home directory by putting a breakpoint in FileSystemLayerImpl_WIN32.cpp line 138
Code: Select all
1>J:\graphic\ogre1.9\RenderSystems\Direct3D11\src/OgreD3D11HLSLProgram.cpp(389): error C2065: 'D3DCOMPILE_DEBUG' : undeclared identifier
1>J:\graphic\ogre1.9\RenderSystems\Direct3D11\src/OgreD3D11HLSLProgram.cpp(392): error C2065: 'D3DCOMPILE_SKIP_OPTIMIZATION' : undeclared identifier
1>J:\graphic\ogre1.9\RenderSystems\Direct3D11\src/OgreD3D11HLSLProgram.cpp(399): error C2065: 'D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR' : undeclared identifier
1>j:\graphic\ogre1.9\RenderSystems\Direct3D11\src/OgreD3D11HLSLProgram.cpp(403): error C2065: 'D3DCOMPILE_PACK_MATRIX_ROW_MAJOR' : undeclared identifier
1>J:\graphic\ogre1.9\RenderSystems\Direct3D11\src/OgreD3D11HLSLProgram.cpp(408): error C2065: 'D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY' : undeclared identifier
1>J:\graphic\ogre1.9\RenderSystems\Direct3D11\src/OgreD3D11HLSLProgram.cpp(416): error C3861: 'D3DCompile': identifier not found
1>J:\graphic\ogre1.9\RenderSystems\Direct3D11\src/OgreD3D11HLSLProgram.cpp(463): error C3861: 'D3DReflect': identifier not found
Assaf Raman wrote:A ready to go WinRT and WP8 solution.
1. Install Window 8 and run it.
2. Install Windows Phone 8 SDK
3. Install Visual Studio Express 2012 for Windows 8
4. Download and uzip this to c: root. (The result will be in C:\1.9WPRC)
5. If you want to compile for Windows Phone 8 - open this solution - C:\1.9WPRC\WP8\build\OGRE.sln using Visual Studio Express 2012 for Windows Phone 8
6. If you want to compile for WinRT - open this solution - C:\1.9WPRC\WinRT\build\OGRE.sln using Visual Studio Express 2012 for Windows 8
I didn't try to build with to paid version of Visual Studio because I wanted to use only free tools (except Windows 8 I guess).
Make sure to use the right Visual Studio versions (as in steps 5,6) - else you won't be able to deploy the app (deploy will fail without any error message to explain why).