Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
@amazon-devices/expo-gl provides GLView that acts as an OpenGL ES render target and provides a GLContext. On the mounting of a GLView, an OpenGL ES context is created. You should receive an onContextCreate function, which takes a gl object. This gl object is the core way of interacting with OpenGL - with the use of JSI, expo-gl creates methods on the gl object that correspond to webgl API methods, for example gl.clearColor. The library doesn’t natively provide a way to render an image for every frame, therefore other JS functions must be used for it, like setInterval. GLView’s drawing buffer is presented as the contents of the View every frame indicated by calling the endFrameEXP method. Methods suffixed with EXP are expo-gl’s extensions. ExpoGL also provides static methods that are usable without a GLView for headless rendering. To learn more, see the documentation for createContextAsync and takeSnapshotAsync. This library is system-deployed and available to React Native for Vega apps without a separate installation process. The library is deployed as an autolinking library, which your app links to at runtime. Compatibility is guaranteed only between the library and the version of React Native for Vega for which it is built.

Installation

  1. Add the JavaScript library dependency in the package.json file.
  2. Reinstall dependencies using npm install command.

Examples

API reference

See the documentation page for information about this library and API reference: Official Expo documentation for expo-gl.

Components

GLView props

Methods

Supported versions

Supported Third-Party Libraries and Services.
Last modified on September 30, 2025