HolographicQuadLayer
HolographicQuadLayer
HolographicQuadLayer
HolographicQuadLayer
Class
Definition
Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prerelease APIs are identified by a Prerelease label.
[Contains prerelease APIs.]
Represents a retained texture for the system to display at a specified location on top of the app's primary rendered content.
public : sealed class HolographicQuadLayer : IClosable, IHolographicQuadLayerpublic sealed class HolographicQuadLayer : IDisposable, IHolographicQuadLayerPublic NotInheritable Class HolographicQuadLayer Implements IDisposable, IHolographicQuadLayer// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
Remarks
A quad layer is a texture that the system’s holographic compositor will render on behalf of the app at a specific location in the world. This allows the compositor to directly sample from that quad texture when producing the final composited image, improving text quality and allowing for lower-resolution world content. Unlike the primary layer's immediate-mode back buffer, which must be filled each frame, quad layers are retained. Once added to a given HolographicCamera, each quad layer will continue to render at its specified location on top of that frame's primary layer back buffer until the quad layer is moved, updated or removed.
To display quad layers, an app creates the necessary HolographicQuadLayer instances and adds them to a HolographicCamera's mutable QuadLayers list. To synchronize a retained quad layer update with a given immediate-mode holographic frame, an app requests an HolographicQuadLayerUpdateParameters instance from that frame by calling HolographicFrame.GetQuadLayerUpdateParameters. Any updates requested on that HolographicQuadLayerUpdateParameters instance will apply starting in that frame.
Apps may position quad layers in a stationary mode or display-relative mode, which affects how they are positioned in future frames if not moved explicitly:
- For a stationary quad, the app calls UpdateLocationWithStationaryMode to specify the spatial position and orientation in the world at which a quad layer should appear. This defines a plane, along with the 2D size of the quad in that plane centered around the specified position.
- For a display-relative quad, the app calls UpdateLocationWithDisplayRelativeMode to specify the spatial position and orientation in world coordinates relative to the display.
Quad layers are rendered in the specified order using the painter’s algorithm, entirely on top of the primary layer. No depth-testing is done while rendering. An app that moves one quad in front of another may reorder the quads in the layer list without having to refill the texture buffers. An app that only wishes to render quad layers, for example during loading scenes, can disable the primary layer entirely by setting IsPrimaryLayerEnabled to false.
If an app no longer needs a quad layer, it may disable that layer by removing it from the camera, which allows the system to reclaim the content buffers allocated for it. If the app knows it is permanently done with a layer, it may close it entirely.
Constructors
HolographicQuadLayer(Size) HolographicQuadLayer(Size) HolographicQuadLayer(Size) HolographicQuadLayer(Size)
Prerelease. Creates a new quad layer with a specified texture size, using a default pixel format of DXGI_FORMAT_B8G8R8A8_UNORM.
public : HolographicQuadLayer(Size size)public HolographicQuadLayer(Size size)Public Sub New(size As Size)// You can use this method in JavaScript.
Remarks
Note that the spatial location and extents of this new quad layer in world coordinates must also be specified by requesting a HolographicQuadLayerUpdateParameters instance.
HolographicQuadLayer(Size, DirectXPixelFormat) HolographicQuadLayer(Size, DirectXPixelFormat) HolographicQuadLayer(Size, DirectXPixelFormat) HolographicQuadLayer(Size, DirectXPixelFormat)
Prerelease. Creates a new quad layer with a specified texture size and pixel format.
public : HolographicQuadLayer(Size size, DirectXPixelFormat pixelFormat)public HolographicQuadLayer(Size size, DirectXPixelFormat pixelFormat)Public Sub New(size As Size, pixelFormat As DirectXPixelFormat)// You can use this method in JavaScript.
The pixel format for the texture that will back this quad layer.
Remarks
Note that the spatial location and extents of this new quad layer in world coordinates must also be specified by requesting a HolographicQuadLayerUpdateParameters instance.
The pixel format specified must be an RGB format, such as DXGI_FORMAT_B8G8R8A8_UNORM.
Properties
PixelFormat PixelFormat PixelFormat PixelFormat
Prerelease. The pixel format for the texture that will back this quad layer.
public : DirectXPixelFormat PixelFormat { get; }public DirectXPixelFormat PixelFormat { get; }Public ReadOnly Property PixelFormat As DirectXPixelFormat// You can use this property in JavaScript.
The pixel format.
Remarks
The pixel format specified must be an RGB format, such as DXGI_FORMAT_B8G8R8A8_UNORM.
Size Size Size Size
Prerelease. The size in pixels of the texture that will back this quad layer.
public : Size Size { get; }public Size Size { get; }Public ReadOnly Property Size As Size// You can use this property in JavaScript.
Remarks
Note that the spatial location and extents of this new quad layer in world coordinates must also be specified by requesting a HolographicQuadLayerUpdateParameters instance.
Methods
Close() Close() Close() Close()
Prerelease. Closes a quad layer, reclaiming any associated system resources.
public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
Remarks
If an app knows that it will not need a given quad layer later, it may permanently close that layer. This allows the system to reclaim any buffers used to retain that layer's texture.