官术网_书友最值得收藏!

Let's have a look at the code

The code you just wrote is a C#, UWP Windows 10 app using DirectX through the SharpDX library. In later chapters, we will examine this much more closely. DirectX is the technology that allows us to write fast-running apps that use a lot of graphics, such as the holograms we create. However, DirectX is a C++ library and can officially only be used in C++ programs. Luckily, the people at SharpDX have written a wrapper around this, so we can use this in our C# applications and apps as well, this is the reason why the HoloLens SDK developers included this in the template. For more information about SharpDX, I suggest that you have a look at their site at http://sharpdx.org/.

The app uses some libraries from the Windows SDK. However, if you look closely at the References part in the solution, you will note that there are no Holographic-specific libraries included. The reason for this is that the APIs needed to run Holographic apps are standard in the Windows 10 runtime. That is right; your Windows 10 computer has all the code it needs to run Holographic apps. Unfortunately, the hardware you have will not support these APIs, so they are not available to use. If you try to deploy this app to a normal machine, you will get errors--the required capabilities are not available and the runtime will refuse to install the app.

This means that our app is a standard Windows 10 UWP app with some extra capabilities added. If you right-click on the Package.appxmanifest, you will find the following tag somewhere:

 <Dependencies> 
<TargetDeviceFamily Name="Windows.Holographic" MinVersion="10.0.10240.0" MaxVersionTested="10.0.10586.0" />
</Dependencies>

This is what makes sure that our device accepts our app and other systems do not--the app is marked for usage in Windows. holographic-capable device. The numbers you see in MinVersion and MaxVersionTested may differ--these depend on the SDK versions that you have installed and chose when you created the project.

主站蜘蛛池模板: 启东市| 仲巴县| 岗巴县| 勃利县| 朝阳县| 平远县| 玛纳斯县| 房山区| 吴桥县| 钦州市| 玉田县| 东至县| 东光县| 阿图什市| 阳原县| 体育| 汶川县| 孝感市| 乐昌市| 汨罗市| 萝北县| 班戈县| 上虞市| 泸定县| 北辰区| 黑水县| 洞头县| 正镶白旗| 类乌齐县| 门头沟区| 哈尔滨市| 慈利县| 嘉峪关市| 孟津县| 腾冲县| 麦盖提县| 迁西县| 葫芦岛市| 天峻县| 新密市| 吴旗县|