You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/remote-rendering/tutorials/native-cpp/hololens/integrate-arr-into-holographic-app.md
+29-6Lines changed: 29 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,11 @@ In this tutorial you will learn:
16
16
> * Using Visual Studio to create a Holographic App that can be deployed to HoloLens
17
17
> * Add the necessary code snippets and project settings to combine local rendering with remotely rendered content
18
18
19
-
This tutorial focuses on adding the necessary bits to a native `Holographic App` sample to combine local rendering with Azure Remote Rendering. It leaves out the parts for proper error- and status display inside the app (for example through text panels), because adding UI elements in native C++ is beyond the scope of this sample. Building a dynamic text panel from scratch is cumbersome as you need to deal with writing text to native `DirectX11` resources via `DirectWrite` and then render these resources as 3d overlays in the scene using custom shaders. A good starting point is class `StatusDisplay`, which is part of the
19
+
This tutorial focuses on adding the necessary bits to a native `Holographic App` sample to combine local rendering with Azure Remote Rendering. The only type of status feedback in this app is through the debug output panel inside Visual Studio, so it is recommended to start the samplefrom inside Visual Studio. Adding proper in-app feedback is beyond the scope of this sample, because building a dynamic text panel from scratch involves a lot of coding. A good starting point is class `StatusDisplay`, which is part of the
20
20
[Remoting Player sample project on GitHub](https://github.com/microsoft/MixedReality-HolographicRemoting-Samples/tree/master/player/common/Content). In fact, the pre-canned version of this tutorial uses a local copy of that class.
21
21
22
22
> [!TIP]
23
-
> The [ARR samples repository](https://github.com/Azure/azure-remote-rendering) contains the outcome of this tutorial as a Visual Studio project that is ready to use. It is also enriched with proper error- and status reporting through UI class `StatusDisplay`. Inside the tutorial, all ARR specific additions are scoped by `#ifdef USE_REMOTE_RENDERING` / `#endif`, so it is easy to see what has been modified.
23
+
> The [ARR samples repository](https://github.com/Azure/azure-remote-rendering) contains the outcome of this tutorial as a Visual Studio project that is ready to use. It is also enriched with proper error- and status reporting through UI class `StatusDisplay`. Inside the tutorial, all ARR specific additions are scoped by `#ifdef USE_REMOTE_RENDERING` / `#endif`, so it is easy to identify the Remote Rendering additions.
case AppConnectionStatus::Disconnected: appStatus = "Disconnected"; break;
356
+
case AppConnectionStatus::CreatingSession: appStatus = "CreatingSession"; break;
357
+
case AppConnectionStatus::Connecting: appStatus = "Connecting"; break;
358
+
case AppConnectionStatus::Connected: appStatus = "Connected"; break;
359
+
case AppConnectionStatus::ConnectionFailed: appStatus = "ConnectionFailed"; break;
360
+
}
361
+
362
+
char buffer[1024];
363
+
sprintf_s(buffer, "Remote Rendering: New status: %s, result: %s\n", appStatus, RR::ResultToString(error));
364
+
OutputDebugStringA(buffer);
342
365
}
343
366
344
367
@@ -427,9 +450,9 @@ The last thing to do is invoking the rendering of the remote content. We have to
427
450
428
451
## Run the sample
429
452
430
-
The sample should now be in a state to compile and run.
453
+
The sample should now be in a state where it compiles and runs.
431
454
432
-
When the sample runs properly, it shows the rotating cube right in front of you, and after some session creation and model loading, it renders the engine model located at current head position. Session creation and model loading may take up to a few minutes. There is no error- or state displaying integrated into this demo. So if something goes wrong (for example, authentication), there is no visible feedback and the engine model just won't appear. It is thus recommended to start the sample from inside Visual Studio and trace state transitions with breakpoints.
455
+
When the sample runs properly, it shows the rotating cube right in front of you, and after some session creation and model loading, it renders the engine model located at current head position. Session creation and model loading may take up to a few minutes. The current status is only written to Visual Studio's output panel. It is thus recommended to start the sample from inside Visual Studio.
433
456
434
457
> [!CAUTION]
435
458
> The client disconnects from the server when the tick function is not called for a few seconds. So triggering breakpoints can very easily cause the application to disconnect.
0 commit comments