@@ -37,7 +37,7 @@ private fun ComponentActivity.surfaceEntityCreate(xrSession: Session) {
3737 // [START androidxr_scenecore_surfaceEntityCreate]
3838 val stereoSurfaceEntity = SurfaceEntity .create(
3939 session = xrSession,
40- stereoMode = SurfaceEntity .StereoMode .STEREO_MODE_SIDE_BY_SIDE ,
40+ stereoMode = SurfaceEntity .StereoMode .SIDE_BY_SIDE ,
4141 pose = Pose (Vector3 (0.0f , 0.0f , - 1.5f )),
4242 shape = SurfaceEntity .Shape .Quad (FloatSize2d (1.0f , 1.0f ))
4343 )
@@ -61,7 +61,7 @@ private fun ComponentActivity.surfaceEntityCreateSbs(xrSession: Session) {
6161 val hemisphereStereoSurfaceEntity =
6262 SurfaceEntity .create(
6363 session = xrSession,
64- stereoMode = SurfaceEntity .StereoMode .STEREO_MODE_SIDE_BY_SIDE ,
64+ stereoMode = SurfaceEntity .StereoMode .SIDE_BY_SIDE ,
6565 pose = xrSession.scene.spatialUser.head?.transformPoseTo(
6666 Pose .Identity ,
6767 xrSession.scene.activitySpace
@@ -78,7 +78,7 @@ private fun ComponentActivity.surfaceEntityCreateTb(xrSession: Session) {
7878 val sphereStereoSurfaceEntity =
7979 SurfaceEntity .create(
8080 session = xrSession,
81- stereoMode = SurfaceEntity .StereoMode .STEREO_MODE_TOP_BOTTOM ,
81+ stereoMode = SurfaceEntity .StereoMode .TOP_BOTTOM ,
8282 pose = xrSession.scene.spatialUser.head?.transformPoseTo(
8383 Pose .Identity ,
8484 xrSession.scene.activitySpace
@@ -94,7 +94,7 @@ private fun ComponentActivity.surfaceEntityCreateMVHEVC(xrSession: Session) {
9494 // Create the SurfaceEntity with the StereoMode corresponding to the MV-HEVC content
9595 val stereoSurfaceEntity = SurfaceEntity .create(
9696 session = xrSession,
97- stereoMode = SurfaceEntity .StereoMode .STEREO_MODE_MULTIVIEW_LEFT_PRIMARY ,
97+ stereoMode = SurfaceEntity .StereoMode .MULTIVIEW_LEFT_PRIMARY ,
9898 pose = Pose (Vector3 (0.0f , 0.0f , - 1.5f )),
9999 shape = SurfaceEntity .Shape .Quad (FloatSize2d (1.0f , 1.0f ))
100100 )
@@ -123,10 +123,10 @@ private fun ComponentActivity.surfaceEntityCreateDRM(xrSession: Session) {
123123 // Create the SurfaceEntity with the PROTECTED content security level.
124124 val protectedSurfaceEntity = SurfaceEntity .create(
125125 session = xrSession,
126- stereoMode = SurfaceEntity .StereoMode .STEREO_MODE_SIDE_BY_SIDE ,
126+ stereoMode = SurfaceEntity .StereoMode .SIDE_BY_SIDE ,
127127 pose = Pose (Vector3 (0.0f , 0.0f , - 1.5f )),
128128 shape = SurfaceEntity .Shape .Quad (FloatSize2d (1.0f , 1.0f )),
129- surfaceProtection = SurfaceEntity .SurfaceProtection .SURFACE_PROTECTION_PROTECTED
129+ surfaceProtection = SurfaceEntity .SurfaceProtection .PROTECTED
130130 )
131131
132132 // Build a MediaItem with the necessary DRM configuration.
@@ -156,16 +156,16 @@ private fun ComponentActivity.surfaceEntityHDR(xrSession: Session) {
156156 // Define the color properties for your HDR video. These values should be specific
157157 // to your content.
158158 val hdrMetadata = SurfaceEntity .ContentColorMetadata (
159- colorSpace = SurfaceEntity .ContentColorMetadata .ColorSpace .COLOR_SPACE_BT2020 ,
160- colorTransfer = SurfaceEntity .ContentColorMetadata .ColorTransfer .COLOR_TRANSFER_ST2084 , // PQ
161- colorRange = SurfaceEntity .ContentColorMetadata .ColorRange .COLOR_RANGE_LIMITED ,
159+ colorSpace = SurfaceEntity .ContentColorMetadata .ColorSpace .BT2020 ,
160+ colorTransfer = SurfaceEntity .ContentColorMetadata .ColorTransfer .ST2084 , // PQ
161+ colorRange = SurfaceEntity .ContentColorMetadata .ColorRange .LIMITED ,
162162 maxContentLightLevel = 1000 // Example: 1000 nits
163163 )
164164
165165 // Create a SurfaceEntity, passing the HDR metadata at creation time.
166166 val hdrSurfaceEntity = SurfaceEntity .create(
167167 session = xrSession,
168- stereoMode = SurfaceEntity .StereoMode .STEREO_MODE_MONO ,
168+ stereoMode = SurfaceEntity .StereoMode .MONO ,
169169 pose = Pose (Vector3 (0.0f , 0.0f , - 1.5f )),
170170 shape = SurfaceEntity .Shape .Quad (FloatSize2d (1.0f , 1.0f )),
171171 )
0 commit comments