enum StereoMode : Enum<StereoMode>
override fun registerPanels(): List<PanelRegistration> {
return listOf(
PanelRegistration(R.layout.panel_layout) {
config {
includeGlass = false
width = 1.0f * (1920f / 1080f) // Match aspect ratio of panel shape with video resolution
height = 1.0f
layoutWidthInPx = 1920 * 2 // Displaying a StereoMode.LeftRight video, so width needs to be doubled.
layoutHeightInPx = 1080
stereoMode = StereoMode.LeftRight // Assign StereoMode
}
})
}
SceneMaterial.custom(
"customShaderName",
arrayOf(
SceneMaterialAttribute("albedoSampler", SceneMaterialDataType.Texture2D),
))
.apply {
setTexture("albedoSampler", albedoTexture)
setStereoMode(StereoMode.None)
}
| Name | Summary |
|---|---|
| Name | Summary |
|---|---|
name | val name: String |
ordinal | val ordinal: Int |
view2OffsetX | val view2OffsetX: Float X offset for the second view (right eye) |
view2OffsetY | val view2OffsetY: Float Y offset for the second view (right eye) |
viewScaleX | val viewScaleX: Float X scale factor for both views |
viewScaleY | val viewScaleY: Float Y scale factor for both views |
| Name | Summary |
|---|---|
valueOf | fun valueOf(value: String): StereoMode Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.) |
values | fun values(): Array<StereoMode> Returns an array containing the constants of this enum type, in the order they’re declared. |