[News] Ogre3D now supports Windows Phone 8!

News, announcements and important global threads from the Ogre3D Team.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Wed Nov 07, 2012 6:03 pm

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).
0 x
Watch out for my OGRE related tweets here.

jarno
Gnoblar
Posts: 8
Joined: Wed Nov 07, 2012 11:18 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by jarno » Thu Nov 08, 2012 8:31 am

Awesome! It works. Thanks again! :)

Do you happen to know if it should be possible to render on a xaml DrawingSurface with Ogre?
Last edited by jarno on Thu Nov 08, 2012 8:36 am, edited 1 time in total.
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Thu Nov 08, 2012 8:36 am

Great! You are the third person on earth to get OGRE running on WP8 (emulation or device)
0 x
Watch out for my OGRE related tweets here.

User avatar
lderan
Gnoblar
Posts: 9
Joined: Mon Nov 05, 2012 2:06 am
Location: Staffs, UK

Re: [News] Ogre3D now supports Windows Phone 8!

Post by lderan » Thu Nov 08, 2012 2:53 pm

mmm that makes me the 4th, thanks for your all assistance Assaf :)
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Thu Nov 08, 2012 2:58 pm

Sure.
I have some GUI fixes - to make sample browser navigation easier - will commit them soon.
0 x
Watch out for my OGRE related tweets here.

User avatar
lderan
Gnoblar
Posts: 9
Joined: Mon Nov 05, 2012 2:06 am
Location: Staffs, UK

Re: [News] Ogre3D now supports Windows Phone 8!

Post by lderan » Fri Nov 09, 2012 2:58 am

All the samples work fine but I do get intermittent break warnings from VS2012,

I got this when I tried to launch the skeletal animation sample, it works after I redeploy the application
Unhandled exception at 0x7182E679 (Msvcr110.dll) in SampleBrowserWP8.exe: An invalid parameter was passed to a function that considers invalid parameters fatal.
stops at line 131 on invarg,c

In debug mode, on the win32 emulator.

Now onto creating a base project to start learning from.
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Fri Nov 09, 2012 9:09 am

If you want to see what the " An invalid parameter" issue is - turn on break on c++ exceptions in visual studio. Good luck with your project.
0 x
Watch out for my OGRE related tweets here.

jsding
Greenskin
Posts: 105
Joined: Tue Dec 14, 2010 9:46 am
Contact:

Re: [News] Ogre3D now supports Windows Phone 8!

Post by jsding » Mon Nov 12, 2012 5:59 am

Good news! We are planning to port our Android/iOS games to Win8, if so.
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Mon Nov 12, 2012 7:08 am

Will be happy to help if you will have issues.
0 x
Watch out for my OGRE related tweets here.

nkligang
Kobold
Posts: 35
Joined: Wed Aug 18, 2010 9:14 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by nkligang » Tue Nov 13, 2012 10:21 am

WP8 running error:
"The project 'SampleBrowserWP8' cannot be started directly. To debug this project, you must reference it from an aplication project thar is specified as the Startup Project."

tell me, how i can do? :x

IDE is VS2012 pro. winRT can run on it. WP8 is not.
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Tue Nov 13, 2012 10:37 am

You need to use the visual studio express that comes with the WP8 SDK.
0 x
Watch out for my OGRE related tweets here.

nkligang
Kobold
Posts: 35
Joined: Wed Aug 18, 2010 9:14 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by nkligang » Tue Nov 13, 2012 11:05 am

i use vs express 2012 for WP, but it show "SampleBrowserWP8 project is incompatible with the current edition of Visual studio".
i had installed VS pro and WP8 SDK >...
Last edited by nkligang on Tue Nov 13, 2012 11:12 am, edited 1 time in total.
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Tue Nov 13, 2012 11:08 am

No clue, it works for me on more then one computer.
Try to create a new WP8 project and see if it runs.
0 x
Watch out for my OGRE related tweets here.

nkligang
Kobold
Posts: 35
Joined: Wed Aug 18, 2010 9:14 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by nkligang » Tue Nov 13, 2012 11:51 am

Assaf Raman wrote:No clue, it works for me on more then one computer.
Try to create a new WP8 project and see if it runs.
thanks Assaf Raman. yes , i create a new WP8 projects (for native only) that run on my computer...there was any proplem with my computer and IDE.
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Tue Nov 13, 2012 3:25 pm

No clue, and I don't know how to recreate the problem - so I don't see how I can help.
Try uninstalling the WP8 SDK then re-installing the version from Microsoft download site.
0 x
Watch out for my OGRE related tweets here.

jarno
Gnoblar
Posts: 8
Joined: Wed Nov 07, 2012 11:18 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by jarno » Tue Nov 13, 2012 7:45 pm

So, I'm now able to pass ogre render results from a WinPRT component to a managed WP project via a shared texture and show them on top of xaml content. However, for some reason I don't seem to be able to get the character sample animations to play in my project (the sample that is shown on the video here http://blogs.msdn.com/b/interoperabilit ... works.aspx). I pretty much just took the character controller class and the asset .zip from the sample and am using them from my renderer, which mimics the CubeRenderer in XAMLAndDirect3D sample project. I'm positive that the character controller addTime method gets called every frame with proper time delta value and that animation addTime gets called as well, but all that happens is that the character changes pose but doesn't animate.

I would appreciate any help. Is this related to WP not supporting hardware skinning(?). Or what could I be missing?

Thanks!
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Tue Nov 13, 2012 9:13 pm

It doesn't work in the OGRE sample browser that I uploaded?
0 x
Watch out for my OGRE related tweets here.

jarno
Gnoblar
Posts: 8
Joined: Wed Nov 07, 2012 11:18 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by jarno » Tue Nov 13, 2012 9:22 pm

It does work in the sample project, but when I try to run the animations in my own project, they don't seem to be playing.
0 x

jarno
Gnoblar
Posts: 8
Joined: Wed Nov 07, 2012 11:18 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by jarno » Wed Nov 14, 2012 4:42 pm

I got the animations to work now. I'm rendering the scene to texture and previously I was just rendering by calling myrendertexture->update(). Now that I switched to Ogre::Root::getSingleton().renderOneFrame(timeDelta) the animations started to work. I would still be interested to hear why the animations didn't work with RenderTexture-update().
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Wed Nov 14, 2012 4:54 pm

How can I recreate your issue?
0 x
Watch out for my OGRE related tweets here.

nkligang
Kobold
Posts: 35
Joined: Wed Aug 18, 2010 9:14 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by nkligang » Thu Nov 15, 2012 7:34 am

Assaf Raman wrote:No clue, and I don't know how to recreate the problem - so I don't see how I can help.
Try uninstalling the WP8 SDK then re-installing the version from Microsoft download site.
thank you. i can run the project on my computer. when i change device orientation to landscape, the scene was not changed?
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Thu Nov 15, 2012 8:03 am

I still have some code from Microsoft that I didn't merge - it may be there.
0 x
Watch out for my OGRE related tweets here.

jarno
Gnoblar
Posts: 8
Joined: Wed Nov 07, 2012 11:18 am

Re: [News] Ogre3D now supports Windows Phone 8!

Post by jarno » Thu Nov 15, 2012 8:31 am

Assaf Raman wrote:How can I recreate your issue?
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).

So, to the modifications that I had to make to Ogre and which I would like to suggest to be added to the codebase. These are from the notes I've written for my team, so ignore the format of the language :). And if I have misunderstood something and/or there are better solutions to the issues, I'd be happy to know.

1. Creating an Ogre window is required to initialize some components of Ogre and currently (D3D11) createRenderWindow throws an exception if you don't pass an externalWindowHandle as miscParam. However, as CoreWindow doesn't seem to exist in a PhoneXamlDirect3D app (?), we can't pass the handle to the Ogre::ROOT->createRenderWindow. As To overcome this we need to modify the createRenderWindoe method to allow creating the window without the handle.
- Modify the code to ignore externalWindowHandle stuff in the method if the handle is not given.

2. It seems that ogre has a bug(?) which makes it create a texture with DXGI_FORMAT_R8G8B8A8_UNORM (instead of DXGI_FORMAT_B8G8R8A8_UNORM) even if Ogre::PF_B8G8R8A8 is given to Ogre::TextureManager::createManual. As DXGI_FORMAT_R8G8B8A8_UNORM can not be a shared texture, we need to add a fix to make ogre greate the texture in right format:
- Add "case PF_B8G8R8A8: return DXGI_FORMAT_B8G8R8A8_UNORM;" to the switch in DXGI_FORMAT D3D11Mappings::_getPF(PixelFormat ogrePF)

3. It also seems that ogre doesn't support creating textures with the misc flags D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX and D3D11_RESOURCE_MISC_SHARED_NTHANDLE which we need for the shared texture. Easiest way to fix this is the following hack [sensured :roll: ]. // Baisicly I would like to see a way in ogre to create textures with these misc flags.
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Assaf Raman » Thu Nov 15, 2012 8:40 am

Can you fork OGRE, fix the code (really fix, not hack it) - then ask for a pull request? This will be the easiest way to get it into OGRE code repo.
0 x
Watch out for my OGRE related tweets here.

User avatar
Borrillis
Kobold
Posts: 27
Joined: Mon Sep 27, 2004 5:44 pm
Contact:

Re: [News] Ogre3D now supports Windows Phone 8!

Post by Borrillis » Thu Nov 15, 2012 5:54 pm

Zonder wrote:
Oenone575 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.
help the mogre people then you get your managed enviroment. but that depends if windows phone has clr
Or you could help out the Axiom project to provide a mostly managed solution.
0 x
Axiom 3D - .Net 3D Rendering Engine

Post Reply