Skip to content

QuarkXRTextureProvider Script (TextureAPI)

Krasi Nikolov edited this page Jan 5, 2021 · 5 revisions

Note: QuarkXRTextureProvider.cs will not work unless you also include QuarkXRClientPlugin.cs in the Unity scene.

TextureAPI

TextureAPI has one method.

Methods:

GetTexture

GetTexture();

This method returns UnityEngine.Texture2D object which you can use to render the streamed desktop. We are providing two examples in our package - one with Oculus OVR overlay and one with a basic Material. For more info please refer to the examples below:

Example Prefabs

The QuarkXR Unity SDK includes several ready prefabs to jumpstart your development:

QuarkXROVROverlayExample. Presenter Mode (rendering with OVROverlay script)

This prefab can be found in the QuarkXROculusSample project under QuarkXRClientPlugin\Examples\Prefabs and contains all the necessary components required for visualizing the streamed texture with OVROverlay.

QuarkXROVROverlayExample contains three hierarchy game objects:

  • QuarkXRPlugin - contains QuarkXRClientPlugin.cs and QuarkXRTextureProvider.cs
  • OVROverlay - contains Oculus OVROverlay script.
  • OVRBackground - contains background for the OVROverlay.

Note: OVRBackground is required in order for OVROverlay to work.

QuarkXRPVROverlayExample. (rendering with Pvr_UnitySDKEyeOverlay script)

This prefab can be found in the QuarkXRPicoSample project under QuarkXRClientPlugin\Examples\Prefabs and contains all the necessary components required for visualizing the streamed texture with Pvr_UnitySDKEyeOverlay.

QuarkXRPVROverlayExample contains three hierarchy game objects:

  • QuarkXRPlugin - contains QuarkXRClientPlugin.cs and QuarkXRTextureProvider.cs
  • PVROverlay - contains PicoVR Pvr_UnitySDKEyeOverlay script.
  • PVRBackground - contains background for the PVROverlay.

QuarkXRSimpleMaterialExample. (rendering with basic material):

This prefab uses a standard material with the streamed texture.

  • QuarkXRPlugin - contains QuarkXRClientPlugin and QuarkXRTextureProvider.
  • VideoPlane - this object contains a plane (mesh filter) and a standard material (QuarkXRSimpleMaterial).

Note: For best visual fidelity of the streamed desktop, QuarkXR recommends the use of OVROverlay or PVROverlay. Each game object included in the prefabs can be resized and repositioned at runtime.