Skip to content

Display

The SDK handles the display functionality via the M2DisplayService (accessed from Evs.displayService).

Display Size & Rendering Position

The glasses display resolution is 640x400 pixels with 16-bit color at approximately 67 Hz refresh rate.

We recommend setting the virtual rendering area smaller than the full display to enable digital personal adjustment of the display position, matching each user's IPD and face structure. A recommended size is 500x300, but developers can define their own area to fit their application needs, up to M2FullScreen which represents the full display area.

For Line of Sight (LOS) views, M2ArScreen uses the full display area (640x400).

Adjusting the virtual screen position

When using the M2Screen, the SDK enables adjusting its position within the full display by calling:

val dx = 10f
val dy = -15f
Evs.screenService.setRenderingCenterX(dx)
Evs.screenService.setRenderingCenterY(dy)
let dx: Float = 10.0
let dy: Float = -15.0
Evs.shared.screenService.setRenderingCenterX(centerX: dx)
Evs.shared.screenService.setRenderingCenterY(centerY: dy)

Adjust Stock UI

To shorten your development cycle, the SDK comes with built-in UI for personal display adjustment.

The Adjust UI lets the user control position, touch sensitivity, auto-brightness, and proximity settings.

To open the personal adjust Stock UI call:

Evs.showUI(M2ShowUIOption.DefaultAdjust)
Evs.shared.showUI(option: M2ShowUIOption.companion.DefaultAdjust)

Using Your Own Adjust View

For custom UX, you can build your own adjust controls:

Evs.showUI(M2ShowUIOption.Adjust(
    showTouch = true,
    showAutoBrightness = true,
    showProximity = true
))

Or implement your own UI that calls the rendering center and brightness APIs directly:

func nudgeRenderingCenter(dx: Float, dy: Float) -> (x: Float, y: Float) {
    let currentX = Evs.shared.screenService.getRenderingCenterX()
    let currentY = Evs.shared.screenService.getRenderingCenterY()
    let nextX = currentX + dx
    let nextY = currentY + dy
    Evs.shared.screenService.setRenderingCenterX(centerX: nextX)
    Evs.shared.screenService.setRenderingCenterY(centerY: nextY)
    return (nextX, nextY)
}

Display Control

The display can be turned on or off programmatically:

Evs.displayService.turnDisplayOn()
Evs.displayService.turnDisplayOff()

Auto Display Off

The glasses display is automatically turned off when the glasses are not in use - for example, when they are off the face, charging, or disconnected from the application.

The SDK won't turn on automatically the display (except when starting firmware update). It is the application's responsibility to turn on the display when required via Evs.displayService.turnDisplayOn().

Brightness

Brightness can be controlled using a continuous scale between 1 to 255:

Evs.displayService.setBrightness(briValue)
Evs.shared.displayService.setBrightness(brightness: briValue)

Auto Brightness

The display service exposes auto brightness control:

Evs.displayService.setAutoBrightnessGain(gain)
val isOn = Evs.displayService.isAutoBrightnessOn()

See Also