简体   繁体   中英

Can we design a HoloLens app as an App, not a game?

Is it actually possible to write an app that is not dependant on the refresh loop but instead triggers the refresh ?

What I mean is that a game is always refreshing in a loop to give the most reactive rendering. Compared to an App that pushes changes when they happen.

My app does not need to refresh continuously because it only has to react when the user interact with it directly. A bit like a viewer. If all you do is show a sphere hanging in the air not doing anything, no color change, etc... then you do not need to refresh its status continuously.

So far I could not find any question/answer, documentation or sample related to that.

If push comes to shove, I will design it as a game, but I would prefer to be gentle on the HoloLens engine if I can.

Don't worry about the "engine". Even on LCD on a typical desktop Windows, the refresh still occurs (though it's no longer a fixed part of the design, unlike in a CRT screen). The screen only cares about changes, and there's still a (pretend-)fixed refresh loop.

A simple way to present an event-like interface on an underlying refresh loop is double buffering. Your refresh loop will simply render a bitmap, and your application will render itself to the bitmap at its own leisure (so you don't have to eg draw text over and over again, which is more expensive).

If you are not looking to do a full virtual reality games in hololens, then just do a UWP application and you can run it in a window in Hololens, and it will run just like any other app and not have to worry about a refresh loop. Do everything the same as you would in unity for a hololens app just make sure the Project Setting > Player > Virtual Reality Supported is set to false. This will allow you to have a windowed application they can place where they want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM