Windows8, WinRT, WOA & Metro
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
Sorry, only now committed the changes I wrote about in my last post here. Still no "how to", wait for it.
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
Try to follow the updated "BuildingOgreWinRT.txt".
Note that I didn't fix SampleBrowserWinRTXaml.vcxproj - so don't use it for now.
I hope to fix it later this week.
Also - notice I changed the dependencies.
Also - you don't need to copy the media folder to be a sub folder of the project anymore, I use and link the original media files - from the current path a few directories above the current one.
Will be happy to a "better English" version of "BuildingOgreWinRT.txt" and "BuildingOgreWindowsPhone.txt"
Note that I didn't fix SampleBrowserWinRTXaml.vcxproj - so don't use it for now.
I hope to fix it later this week.
Also - notice I changed the dependencies.
Also - you don't need to copy the media folder to be a sub folder of the project anymore, I use and link the original media files - from the current path a few directories above the current one.
Will be happy to a "better English" version of "BuildingOgreWinRT.txt" and "BuildingOgreWindowsPhone.txt"
Watch out for my OGRE related tweets here.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
Thanks Assaf for working on this.
Previously I was getting dependencies from another location, but I'm following the text more strictly and I saw there were some changes as you said. (Now using https://bitbucket.org/assaframan/ogre-d ... cies-winrt depot)
I encountered 2 build errors trying to build "OgreDependencies.VS2012.WinRT.sln":
The following libraries were built (debug): freetype2311_d.lib, zlibd.lib, zziplibd.lib
UPDATE: In "Release" mode all 12 projects built successfully, I get the following libs: FreeImage.lib, freetype2311.lib, zlib.lib, zziplib.lib
Previously I was getting dependencies from another location, but I'm following the text more strictly and I saw there were some changes as you said. (Now using https://bitbucket.org/assaframan/ogre-d ... cies-winrt depot)
I encountered 2 build errors trying to build "OgreDependencies.VS2012.WinRT.sln":
First issue is pointing to this code, in tif_dirinfo.c:Error 2 error C4996: '_lfind': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lfind. See online help for details. d:\gamedevelopment\ogredepswinrt\src\freeimage-3.13.1\source\libtiff\tif_dirinfo.c 799 LibTIFF
Error 10 error LNK1181: cannot open input file 'D:\GameDevelopment\OgreDepsWinRT\src\FreeImage-3.13.1\Source\LibTIFF\Debug\LibTIFF.lib' D:\GameDevelopment\OgreDepsWinRT\src\FreeImage-3.13.1\Source\FreeImageLib\LINK FreeImageLib
Code: Select all
ret = (const TIFFFieldInfo **) lfind(&pkey,
tif->tif_fieldinfo,
&tif->tif_nfields,
sizeof(TIFFFieldInfo *),
tagNameCompare);
UPDATE: In "Release" mode all 12 projects built successfully, I get the following libs: FreeImage.lib, freetype2311.lib, zlib.lib, zziplib.lib
Creator of QuickGUI!
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
I'm trying to build the SampleBrowserWinRT project (release) using a minimal number of projects. OgreMain takes forever to build on my home machine, and building all the samples would take quite a while.
I've selected to following projects to build:
OgreMain
OgreOverlay
OgreRTShaderSystem
RenderSystem_Direct3D11
SampleBrowserWinRT
Everything builds except the SampleBrowserWinRT and OgreRTShaderSystem:
I added #include "OgreLogManager.h" to OgreShaderGLSLESProgramWriter.cpp and this fixed the errors.
Now only the SampleBrowserWinRT project cannot be built:
Not idea what this means.
Also, I see this warning quite a bit:
The warning points to this line, in Microsoft.CppBuild.targets:
I've selected to following projects to build:
OgreMain
OgreOverlay
OgreRTShaderSystem
RenderSystem_Direct3D11
SampleBrowserWinRT
Everything builds except the SampleBrowserWinRT and OgreRTShaderSystem:
Code: Select all
Error 1 error C2027: use of undefined type 'Ogre::LogManager' D:\GameDevelopment\Ogre\Components\RTShaderSystem\src\OgreShaderGLSLESProgramWriter.cpp 198 OgreRTShaderSystem
Error 2 error C2228: left of '.logMessage' must have class/struct/union D:\GameDevelopment\Ogre\Components\RTShaderSystem\src\OgreShaderGLSLESProgramWriter.cpp 198 OgreRTShaderSystem
Error 3 error C3861: 'getSingleton': identifier not found D:\GameDevelopment\Ogre\Components\RTShaderSystem\src\OgreShaderGLSLESProgramWriter.cpp 198 OgreRTShaderSystem
Now only the SampleBrowserWinRT project cannot be built:
Code: Select all
Error 12 error APPX0702: Payload file 'D:\GameDevelopment\Ogre\Samples\Browser\WinRT\cache.bin' does not exist. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets 926 SampleBrowserWinRT
Also, I see this warning quite a bit:
Code: Select all
1>------ Build started: Project: SampleBrowserWinRT, Configuration: Release Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(348,5): warning MSB8021: The value 'MultiByte' of the variable 'CharacterSet' is incompatible with the value 'true' of the variable 'WindowsAppContainer'.
Code: Select all
<VCMessage Code="MSB8021" Type="%(CompatibilityIssues.Type)" Arguments="%(CompatibilityIssues.FirstValue);%(CompatibilityIssues.FirstName);%(CompatibilityIssues.SecondValue);%(CompatibilityIssues.SecondName)" Condition="'%(CompatibilityIssues.Identity)' != '' and '$(DesignTimeBuild)'!='true'" />
Creator of QuickGUI!
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
The English is OK, but I have fixed it a little to be more clear on some parts and more up to date (CMake 2.8.10 needed).Assaf Raman wrote:Will be happy to a "better English" version of "BuildingOgreWinRT.txt" and "BuildingOgreWindowsPhone.txt"
Code: Select all
To build Ogre in WinRT mode some manual steps are required:
1. The code and generated cmake solution can't be on a network drive -
else you will get a similar error when you will try to run the result exe:
"
Error : DEP0700 : Registration of the app in the layout folder "\bin\Debug\AppX" failed.
Rejecting a request to register from file:////bin/Debug/AppX/AppxManifest.xml because
the files are on a network share. Copy the files to the local computer before registering
the package.
"
I found this issue the hard way when working with VMWare and shared folders to the host
computer.
2. You need Windows 8 Release Preview (build 8400) or later.
Windows 8 Developer/Consumer Preview (build 8102/8250) are not supported.
We recommend using the final version of Windows 8. You can get a trial version
from the Microsoft site, google for it.
3. Using TortoiseHg or other Mercurial client, clone the patched dependency repository:
(https://bitbucket.org/assaframan/ogre-dependencies-winrt) -> C:\OgreDeps
Cg is not supported, and only headers from OIS are needed.
Also clone Ogre repository:
(https://bitbucket.org/sinbad/ogre/overview) -> C:\Ogre
4. You need Visual Studio 2012 Release Preview or later.
Note: There have been reports of issues with the express version.
We recommend using one of final version of Visual Studio 2012. You can get a
trial version from the Microsoft site, google for it.
5. Compile dependencies for all configurations that you plan to use before running CMake.
Dependencies for Win32 and for WinRT must be located in separate folders, Win32 version
can be built from OgreDependencies.VS2012.sln, WinRT from OgreDependencies.VS2012.WinRT.sln
6. Install CMake version 2.8.10 or later. (Earlier CMake versions have problems creating
VS2012 projects. CMake versions before 2.8.8 are missing the special target properties: VS_WINRT_EXTENSIONS and VS_WINRT_REFERENCES).
(http://www.cmake.org/)
Run CMake, select "Visual Studio 11" generator, specify ogre source and binary output folders,
then press "Configure". Specify WinRT dependencies folder, for example "C:\OgreDeps", and again
press "Configure". Select projects to build and press "Configure". When no more errors or red rows are shown, press "Generate".
7. Open the binary output folder specified in step 6. Open OGRE.sln. Remove the following
projects from the solution: ALL_BUILD, INSTALL, PACKAGE.
8. In WinRT mode VS2012 by default uses precompiled headers, and CMake can not yet prevent this.
So, open OGRE.sln in Visual Studio, select All projects (but not the solution itself)
Right click, than go to "Properties" select "Configuration Properties", than "All Configurations"
and under "Configuration Properties > General > Windows Store App Support" choose "Yes". After this
(not before) go to "Configuration Properties > C/C++ > Precompiled Headers > Precompiled Header"
and choose "Not Using Precompiled Headers".
9. As CMake can not generate valid WinRT app project we need to use our own.
Therefore "File > Add > Existing Project ..." and select
"Samples > Browser > WinRT > SampleBrowserWinRT.vcxproj".
Repeat this for "Samples > Browser > WinRT.Xaml > SampleBrowserWinRTXaml.vcxproj".
if this is your first time on that computer - you will be asked for a developer licence, do the
required steps.
10. Add dependencies to solution by right clicking the solution, selecting add existing project,
select "solution" in the combo next to the file select edit at the bottom then select the
dependencies solution, all the dependencies should be now a part of the solution. Remove OIS
project that you just add - but leave the rest in.
11. Add project dependencies: "SampleBrowserWinRT > Properties", than
"Common Properties > Framework and References", remove all existing references
and then "add" and in that window add a check mark next to all the projects on the list (except
for the SampleBrowser projects...)
Repeat this for SampleBrowserWinRTXaml.
In prerelease version of VS2012 it take big amount of time, but this bug was fixed in RTM.
12. Select only RenderSystem_Direct3D11 project in the solution tree, right click, properties, select all configs and "win32" platform in the combos at the top of the properties window, select "configuration properties"->"C++"->"General" on the tree on the left of that window, and set "Consume Windows Runtime Extension" to "Yes (/ZW)".
13. Try to build the solution.
14. If you have a compile issue with finding OIS.h - this is becouse SampleBrowserWinRT.vcxproj
wasn't generated by cmake, the way to fix it is just to copy paste the ois path from one of the
other projects "additional include directories" to SampleBrowserWinRT.vcxproj "additional
include directories" config.
15. If you get any compile\link error with "...mklink /J..." failed - it mean that the
code is not on a local drive (VMWare shared folder will not work for this...)
16. Select SampleBrowserWinRT or SampleBrowserWinRTXaml as the start up project and run.
Creator of QuickGUI!
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
I cannot run my application. A window appears:
This exception started happening after adding OgreMain.lib as a lib dependency and trying to create OgreRoot.
Callstack tells me very little, and the exception has no information in it:First-change exception at 0x76274B32 in LoS3.exe: Microsoft C++ exception:
Platform:COMException ^ at memory location 0x0334F4F0.
HRESULT:0x8007007E
Code: Select all
KernelBase.dll!76274b32() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]
> msvcr110d.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 152 C++
vccorlib110d.dll!__abi_WinRTraiseCOMException(long hr) Line 502 C++
LoS3.exe!__abi_WinRTraiseException(long __hrArg) Line 1156 C++
LoS3.exe!__abi_ThrowIfFailed(long __hrArg) Line 92 C++
LoS3.exe!Gaia::Game::Game(Windows::ApplicationModel::Core::CoreApplicationView ^ __param0) C++
LoS3.exe!LoS3::LoS3::[Windows::ApplicationModel::Core::IFrameworkView]::Initialize(Windows::ApplicationModel::Core::CoreApplicationView ^ applicationView) Line 21 C++
LoS3.exe!LoS3::LoS3::[Windows::ApplicationModel::Core::IFrameworkView]::__abi_Windows_ApplicationModel_Core_IFrameworkView____abi_Initialize(Windows::ApplicationModel::Core::CoreApplicationView ^ __param0) C++
Creator of QuickGUI!
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
Turn on all exceptions (debug->exceptions ->check all boxes) - this will give you a better result.
One more thing that may be missing from the guide - I statically built OGRE - turn on in cmake OGRE_STATIC - as this may be a "load dll" issue.
One more thing that may be missing from the guide - I statically built OGRE - turn on in cmake OGRE_STATIC - as this may be a "load dll" issue.
Watch out for my OGRE related tweets here.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
With the help of a coworker I found a solution. Apparently the dll needs to be included as part of the project!
Here is my setup:
a) Windows Store App Direct3D Game project (C++)
b) Windows Runtime Component project (C++)
What I did:
1. Right click project (a), "Add Existing Item.."
2. Select OgreMain_d.dll
3. Select OgreMain_d.dll in solution explorer.
4. In properties window, set "Content" to "True".
I believe all required dll's will need to follow this setup. I'll experiment since I like to use the Octree SceneManager plugin.
btw, how is the OgreRTShaderSystem_d.dll used? It's been a while since I used Ogre, and this new dll is foreign to me. Is it a plugin, or a component, and do I need it? (If so, how do I use it?)
Here is my setup:
a) Windows Store App Direct3D Game project (C++)
b) Windows Runtime Component project (C++)
What I did:
1. Right click project (a), "Add Existing Item.."
2. Select OgreMain_d.dll
3. Select OgreMain_d.dll in solution explorer.
4. In properties window, set "Content" to "True".
I believe all required dll's will need to follow this setup. I'll experiment since I like to use the Octree SceneManager plugin.
btw, how is the OgreRTShaderSystem_d.dll used? It's been a while since I used Ogre, and this new dll is foreign to me. Is it a plugin, or a component, and do I need it? (If so, how do I use it?)
Creator of QuickGUI!
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
I'm not able to reference the plugins for some reason. The following code fails to run:
ogre.log:
Code: Select all
// Create Root Ogre object
mOgreRoot = new Ogre::Root("", "", ogreLogPath);
// Add Ogre Plugins
#if _DEBUG
mOgreRoot->loadPlugin("RenderSystem_Direct3D11_d.dll");
mOgreRoot->loadPlugin("Plugin_OctreeSceneManager_d.dll");
#else
mOgreRoot->loadPlugin("RenderSystem_Direct3D11.dll");
mOgreRoot->loadPlugin("Plugin_OctreeSceneManager.dll");
#endif
I wonder if there is an error with the way that Ogre tries to load another dll? The dll is in the same location as Ogre.. I don't know why it cannot be found, or if that error is accurate.15:33:46: OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library RenderSystem_Direct3D11_d.dll. System Error: The specified module could not be found.
in DynLib::load at ..\..\OgreMain\src\OgreDynLib.cpp (line 97)
Creator of QuickGUI!
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
Assaf Raman wrote:Turn on all exceptions (debug->exceptions ->check all boxes) - this will give you a better result.
One more thing that may be missing from the guide - I statically built OGRE - turn on in cmake OGRE_STATIC - as this may be a "load dll" issue.
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
D3D11 doesn't have a fixed pipeline, meaning you have to use shaders when rendering, the eRTShaderSystem stands for "realtime shader generator".KungFooMasta wrote: btw, how is the OgreRTShaderSystem_d.dll used? It's been a while since I used Ogre, and this new dll is foreign to me. Is it a plugin, or a component, and do I need it? (If so, how do I use it?)
Read more here: http://www.ogre3d.org/tikiwiki/tiki-ind ... der+System
Watch out for my OGRE related tweets here.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
Thanks, I will read up on it.
how does static linking work with plugins? I thought we have to use dlls.
mOgreRoot->loadPlugin("mydll.dll");
(more specifically, can I static link the RenderSystem_Direct3D11 project and register it as a plugin, without using a dll?)
how does static linking work with plugins? I thought we have to use dlls.
mOgreRoot->loadPlugin("mydll.dll");
(more specifically, can I static link the RenderSystem_Direct3D11 project and register it as a plugin, without using a dll?)
Creator of QuickGUI!
-
- OGRE Expert User
- Posts: 1920
- Joined: Sun Feb 19, 2012 9:24 pm
- Location: Russia
- x 201
Re: Windows8, WinRT, WOA & Metro
You just link them statically, create an instance for each used plugin and invoke Ogre::Root::installPlugin().KungFooMasta wrote:how does static linking work with plugins? I thought we have to use dlls.
Code: Select all
Ogre::CgPlugin cg;
Ogre::OctreePlugin octreeSceneManager;
Ogre::Root::getSingleton().installPlugin( &cg );
Ogre::Root::getSingleton().installPlugin( &octreeSceneManager );
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
Before trying the static linking route, I tried one more thing:
This code compiles and runs without any problems. When uncommented, the ogre.log says it can't find "RenderSystem...dll", but I think that must be an incorrect error message. I will try static linking to see if I can instantiate the RenderSystem plugin without any crashes.
Code: Select all
//mOgreRoot->loadPlugin("RenderSystem_Direct3D11_d.dll");
mOgreRoot->loadPlugin("Plugin_OctreeSceneManager_d.dll");
Creator of QuickGUI!
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
Note - I wasn't able to get the XAML version working with static linking.
Watch out for my OGRE related tweets here.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
When I try to build OgreMain as a statically linked lib, I get the following error:
(I used CMake to generate a solution with the following projects, with the statically linked option set)
- OgreMain (can't build )
- OgreRTShaderSystem
- Plugin_OctreeSceneManager
- RenderSystem_Direct3D11
Have you seen this? I can't build OgreMain, apparently its too monstrous. I tried building just the DX11 render system as a statically linked lib, and it succeeded, however I get odd linker errors when I try to reference the lib in my game project:
Code: Select all
Error 4 error LNK1248: image size (80000078) exceeds maximum allowable size (80000000) D:\GameDevelopment\Ogre\static_link_bin\OgreMain\LINK OgreMain
- OgreMain (can't build )
- OgreRTShaderSystem
- Plugin_OctreeSceneManager
- RenderSystem_Direct3D11
Have you seen this? I can't build OgreMain, apparently its too monstrous. I tried building just the DX11 render system as a statically linked lib, and it succeeded, however I get odd linker errors when I try to reference the lib in my game project:
Code: Select all
Error 2 error LNK2019: unresolved external symbol _D3DCompile@44 referenced in function "protected: void __thiscall Ogre::D3D11HLSLProgram::compileMicrocode(void)" (?compileMicrocode@D3D11HLSLProgram@Ogre@@IAEXXZ) D:\GameDevelopment\Win8\Gaia\RenderSystem_Direct3D11_d.lib(OgreD3D11HLSLProgram.obj) Gaia
Error 3 error LNK2019: unresolved external symbol _D3DReflect@16 referenced in function "protected: void __thiscall Ogre::D3D11HLSLProgram::compileMicrocode(void)" (?compileMicrocode@D3D11HLSLProgram@Ogre@@IAEXXZ) D:\GameDevelopment\Win8\Gaia\RenderSystem_Direct3D11_d.lib(OgreD3D11HLSLProgram.obj) Gaia
Error 4 error LNK2001: unresolved external symbol _IID_ID3D11ShaderReflection D:\GameDevelopment\Win8\Gaia\RenderSystem_Direct3D11_d.lib(OgreD3D11HLSLProgram.obj) Gaia
Creator of QuickGUI!
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
Add to "additional dependencies"
Code: Select all
uuid.lib;dxgi.lib;dxguid.lib;d3dcompiler.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
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).
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).
Watch out for my OGRE related tweets here.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
I was able to compile all projects for WinRT. I was also able to statically link all the built libs. But now when I run my application I get that COM exception again. I've enabled all C++ exceptions, and did a search on the exception code.. it looks like maybe a LoadLibrary call is failing. But that doesn't really make sense since I shouldn't be using any dll's.
Do you think adding the /ZW flag to the projects would make any difference?
Do you think adding the /ZW flag to the projects would make any difference?
Creator of QuickGUI!
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
Try my solution and compare.
Watch out for my OGRE related tweets here.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
Hm, for some reason I didn't think of that.
I was able to run your SampleBrowserWinRT project, and I saw the samples! Wow, I finally saw Ogre running! And I can confirm it all works using Visual Studio 2012 Ultimate.
I was about to post a very minimal solution that demonstrated my inability to load Ogre. Would you be able to take a look? Meanwhile, I will see what is different between your project and mine.
http://stormsonggames.com/downloads/OGR ... amples.zip
This project is how most people would use Ogre, I believe. I created a project using the "Visual C++" -> "Windows Store" -> "Direct3D App" template. The code I have added to the default project is very small, and I've outlined the code I've written. I think if we can get this working, it would be a great example for others.
I was able to run your SampleBrowserWinRT project, and I saw the samples! Wow, I finally saw Ogre running! And I can confirm it all works using Visual Studio 2012 Ultimate.
I was about to post a very minimal solution that demonstrated my inability to load Ogre. Would you be able to take a look? Meanwhile, I will see what is different between your project and mine.
http://stormsonggames.com/downloads/OGR ... amples.zip
This project is how most people would use Ogre, I believe. I created a project using the "Visual C++" -> "Windows Store" -> "Direct3D App" template. The code I have added to the default project is very small, and I've outlined the code I've written. I think if we can get this working, it would be a great example for others.
Creator of QuickGUI!
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
Good idea, I will only have time to look at this in Friday, try to sort it out yourself by comparing the projects.
Watch out for my OGRE related tweets here.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
I noticed your project uses a lot of "references", which I don't normally do. Referencing can only work with projects, right? This means my application would have to have Ogre, DX11 Render System, FreeImage, etc. etc. projects alongside it in the solution.
In the past I would build Ogre, Bullet, etc. and make my own Dependencies folder, with subfolders: include/lib/bin. My project would just have include/lib paths to the Dependencies folder, and I wouldn't have to have all the source on every machine I worked on. If I have to reference other projects in order to package everything up correctly for use, it means my solution will need to have an extra 20 projects.
In the past I would build Ogre, Bullet, etc. and make my own Dependencies folder, with subfolders: include/lib/bin. My project would just have include/lib paths to the Dependencies folder, and I wouldn't have to have all the source on every machine I worked on. If I have to reference other projects in order to package everything up correctly for use, it means my solution will need to have an extra 20 projects.
Creator of QuickGUI!
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Re: Windows8, WinRT, WOA & Metro
I have a temporary solution. It looks like Ogre or the RenderSystem wants to load the dll D3DCOMPILER_46.dll when loading. I added that to my project that now I am moving forward. I don't think this will pass certification, but I think there is a workaround that can be done when I'm ready to submit.
Creator of QuickGUI!
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Windows8, WinRT, WOA & Metro
This is not a problem - the solution is the same as in WP8.
Watch out for my OGRE related tweets here.