Saturday, April 27, 2019

MNREAD App rendering engine upgraded

The MNREAD app uses a relatively low-level graphic application programming interface (API) to render sentences onto the display. This API allows the app to place each word at its precise location onscreen and to control when a sentence appears. The API also helps record the duration of each stimulus presentation.



The MNREAD app, up to version 1.5, uses OpenGL, which is sufficient for all the tasks the app needs to perform. However, late in 2017, Apple announced that the hardware support for OpenGL on all iOS devices would be phased out, to be replaced by a proprietary graphic API called Metal. From iOS 12 onwards, support for OpenGL programming calls on iOS app are considered "deprecated", which translates roughly to "you just might be able to run it, but it may, and will eventually, fail; if it fails, tough luck". We generally are not inclined to make unnecessary programming changes for a validated test suite, in particular changes related to display and control of visual stimuli in a psychophysical test. In this instance, however, the hardware and platform changes made such modifications unavoidable.

The MNREAD app has now switched to use Metal framework as the default rendering engine, starting from version 1.6 in early 2019. To complicate matters further, after this release, we received reports that the app stopped functioning on some devices. We then realized that several models of the iPads, mostly those predating 2014, did not include the hardware needed to run Metal. This resulted in another update, version 1.7, which reverted to using OpenGL on older devices, and Metal on newer devices. The app will detect the hardware support underneath to automatically select the appropriate rendering to use.

In addition, it is also possible to make the app always use the older version of the rendering engine, in case the automatic detection fails. The steps below show how to activate it.


Tap on "Settings" button at top left corner of the main app screen

Tap to turn on the switch for "OpenGL"



While these updates included substantial code changes in the software, their ultimate goal was to keep the display exactly the same as if nothing has ever changed. I think we have been successful at doing just that. If you notice anything otherwise, leave us a note in the comment section and we will follow up.