Class KHRCompositionLayerCylinder

java.lang.Object
org.lwjgl.openxr.KHRCompositionLayerCylinder

public final class KHRCompositionLayerCylinder extends Object
The XR_KHR_composition_layer_cylinder extension.

This extension adds an additional layer type where the XR runtime must map a texture stemming from a swapchain onto the inside of a cylinder section. It can be imagined much the same way a curved television display looks to a viewer. This is not a projection type of layer but rather an object-in-world type of layer, similar to XrCompositionLayerQuad. Only the interior of the cylinder surface must be visible; the exterior of the cylinder is not visible and must not be drawn by the runtime.

The cylinder characteristics are specified by the following parameters:


      XrPosef           pose;
      float             radius;
      float             centralAngle;
      float             aspectRatio;

These can be understood via the following diagram, which is a top-down view of a horizontally oriented cylinder. The aspect ratio drives how tall the cylinder will appear based on the other parameters. Typically the aspectRatio would be set to be the aspect ratio of the texture being used, so that it looks the same within the cylinder as it does in 2D.

  • r — Radius
  • a — Central angle in (0, 2π)
  • p — Origin of pose transform
  • U/V — UV coordinates
  • Field Details

    • XR_KHR_composition_layer_cylinder_SPEC_VERSION

      public static final int XR_KHR_composition_layer_cylinder_SPEC_VERSION
      The extension specification version.
      See Also:
    • XR_KHR_COMPOSITION_LAYER_CYLINDER_EXTENSION_NAME

      public static final String XR_KHR_COMPOSITION_LAYER_CYLINDER_EXTENSION_NAME
      The extension name.
      See Also:
    • XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR

      public static final int XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR
      Extends XrStructureType.
      See Also: