expo-gl 57.0.0 → 57.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +2 -2
  3. package/build/GLView.d.ts +2 -1
  4. package/build/GLView.d.ts.map +1 -1
  5. package/build/GLView.js +2 -1
  6. package/build/GLView.js.map +1 -1
  7. package/expo-module.config.json +1 -1
  8. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.aar +0 -0
  9. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.aar.md5 +1 -0
  10. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.aar.sha1 +1 -0
  11. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.aar.sha256 +1 -0
  12. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.aar.sha512 +1 -0
  13. package/local-maven-repo/host/exp/exponent/expo.modules.gl/{57.0.0/expo.modules.gl-57.0.0.module → 57.0.1/expo.modules.gl-57.0.1.module} +17 -17
  14. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.module.md5 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.module.sha1 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.module.sha256 +1 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.module.sha512 +1 -0
  18. package/local-maven-repo/host/exp/exponent/expo.modules.gl/{57.0.0/expo.modules.gl-57.0.0.pom → 57.0.1/expo.modules.gl-57.0.1.pom} +1 -1
  19. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.pom.md5 +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.pom.sha1 +1 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.pom.sha256 +1 -0
  22. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.1/expo.modules.gl-57.0.1.pom.sha512 +1 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml +4 -4
  24. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.md5 +1 -1
  25. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha1 +1 -1
  26. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha256 +1 -1
  27. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha512 +1 -1
  28. package/package.json +3 -3
  29. package/src/GLView.tsx +2 -1
  30. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.aar +0 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.aar.md5 +0 -1
  32. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.aar.sha1 +0 -1
  33. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.aar.sha256 +0 -1
  34. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.aar.sha512 +0 -1
  35. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.module.md5 +0 -1
  36. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.module.sha1 +0 -1
  37. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.module.sha256 +0 -1
  38. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.module.sha512 +0 -1
  39. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.pom.md5 +0 -1
  40. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.pom.sha1 +0 -1
  41. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.pom.sha256 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.gl/57.0.0/expo.modules.gl-57.0.0.pom.sha512 +0 -1
  43. /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{57.0.0/expo.modules.gl-57.0.0-sources.jar → 57.0.1/expo.modules.gl-57.0.1-sources.jar} +0 -0
  44. /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{57.0.0/expo.modules.gl-57.0.0-sources.jar.md5 → 57.0.1/expo.modules.gl-57.0.1-sources.jar.md5} +0 -0
  45. /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{57.0.0/expo.modules.gl-57.0.0-sources.jar.sha1 → 57.0.1/expo.modules.gl-57.0.1-sources.jar.sha1} +0 -0
  46. /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{57.0.0/expo.modules.gl-57.0.0-sources.jar.sha256 → 57.0.1/expo.modules.gl-57.0.1-sources.jar.sha256} +0 -0
  47. /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{57.0.0/expo.modules.gl-57.0.0-sources.jar.sha512 → 57.0.1/expo.modules.gl-57.0.1-sources.jar.sha512} +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 57.0.1 — 2026-06-30
14
+
15
+ ### 💡 Others
16
+
17
+ - Update docs to `createContextAsync` and `destroyContextAsync` methods which purpose wasn't documented and [was confusing](https://github.com/expo/expo/issues/40037). ([#47200](https://github.com/expo/expo/pull/47200) by [@HubertBer](https://github.com/HubertBer))
18
+
13
19
  ## 57.0.0 — 2026-06-25
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -11,7 +11,7 @@ def reactNativeArchitectures() {
11
11
  }
12
12
 
13
13
  group = 'host.exp.exponent'
14
- version = '57.0.0'
14
+ version = '57.0.1'
15
15
 
16
16
  android {
17
17
  if (rootProject.hasProperty("ndkPath")) {
@@ -24,7 +24,7 @@ android {
24
24
  namespace "expo.modules.gl"
25
25
  defaultConfig {
26
26
  versionCode 31
27
- versionName "57.0.0"
27
+ versionName "57.0.1"
28
28
 
29
29
  externalNativeBuild {
30
30
  cmake {
package/build/GLView.d.ts CHANGED
@@ -19,12 +19,13 @@ export declare class GLView extends React.Component<GLViewProps> {
19
19
  * It's useful for headless rendering or in case you want to keep just one context per application and share it between multiple components.
20
20
  * It is slightly faster than usual context as it doesn't swap framebuffers and doesn't present them on the canvas,
21
21
  * however it may require you to take a snapshot in order to present its results.
22
+ * Note that the context created using `createContextAsync` has to be destroyed using `destroyContextAsync`.
22
23
  * Also, keep in mind that you need to set up a viewport and create your own framebuffer and texture that you will be drawing to, before you take a snapshot.
23
24
  * @return A promise that resolves to WebGL context object. See [WebGL API](#webgl-api) for more details.
24
25
  */
25
26
  static createContextAsync(): Promise<ExpoWebGLRenderingContext>;
26
27
  /**
27
- * Destroys given context.
28
+ * Destroys given context. This method is intended to use to destroy headless context created with `createContextAsync`.
28
29
  * @param exgl WebGL context to destroy.
29
30
  * @return A promise that resolves to boolean value that is `true` if given context existed and has been destroyed successfully.
30
31
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GLView.d.ts","sourceRoot":"","sources":["../src/GLView.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,eAAe,EACf,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAIxB,MAAM,MAAM,WAAW,GAAG;IACx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G,OAAO,CAAC,YAAY,CAAC;IAiBrF,kBAAkB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAOjE;;;;OAIG;IACG,iBAAiB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAO5E"}
package/build/GLView.js CHANGED
@@ -27,6 +27,7 @@ export class GLView extends React.Component {
27
27
  * It's useful for headless rendering or in case you want to keep just one context per application and share it between multiple components.
28
28
  * It is slightly faster than usual context as it doesn't swap framebuffers and doesn't present them on the canvas,
29
29
  * however it may require you to take a snapshot in order to present its results.
30
+ * Note that the context created using `createContextAsync` has to be destroyed using `destroyContextAsync`.
30
31
  * Also, keep in mind that you need to set up a viewport and create your own framebuffer and texture that you will be drawing to, before you take a snapshot.
31
32
  * @return A promise that resolves to WebGL context object. See [WebGL API](#webgl-api) for more details.
32
33
  */
@@ -35,7 +36,7 @@ export class GLView extends React.Component {
35
36
  return getGl(exglCtxId);
36
37
  }
37
38
  /**
38
- * Destroys given context.
39
+ * Destroys given context. This method is intended to use to destroy headless context created with `createContextAsync`.
39
40
  * @param exgl WebGL context to destroy.
40
41
  * @return A promise that resolves to boolean value that is `true` if given context existed and has been destroyed successfully.
41
42
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GLView.js","sourceRoot":"","sources":["../src/GLView.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAS7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AASxE,MAAM,cAAc,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AACrD,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,OAAO,MAAM,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;;AAGH,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AAE/B,SAAS,mBAAmB,CAAC,SAAiB;IAC5C,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,qBAAqB,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,CAAC;AAChD,CAAC;AAED,6CAA6C;AAC7C,MAAM,KAAK,GAAG,CAAC,SAAiB,EAA6B,EAAE;IAC7D,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;QAC3B,MAAM,IAAI,UAAU,CAClB,sBAAsB,EACtB,mHAAmH,CACpH,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAEpD,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAErB,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,IAAyC,EAAU,EAAE;IACzE,MAAM,SAAS,GAAG,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IAE3E,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import {\n UnavailabilityError,\n requireNativeModule,\n requireNativeViewManager,\n CodedError,\n} from 'expo-modules-core';\nimport * as React from 'react';\nimport { Platform, View, findNodeHandle } from 'react-native';\n\nimport { configureLogging } from './GLUtils';\nimport type {\n ComponentOrHandle,\n SurfaceCreateEvent,\n GLSnapshot,\n ExpoWebGLRenderingContext,\n SnapshotOptions,\n GLViewProps,\n} from './GLView.types';\nimport { createWorkletContextManager } from './GLWorkletContextManager';\n\n// @docsMissing\nexport type WebGLObject = {\n id: number;\n};\n\ndeclare let global: any;\n\nconst GLNativeModule = requireNativeModule('ExpoGL');\nconst NativeView = requireNativeViewManager('ExpoGL');\nconst workletContextManager = createWorkletContextManager();\n\nexport function getWorkletContext(contextId: number): ExpoWebGLRenderingContext | undefined {\n 'worklet';\n return workletContextManager.getContext(contextId);\n}\n\n// @needsAudit\n/**\n * A View that acts as an OpenGL ES render target. On mounting, an OpenGL ES context is created.\n * Its drawing buffer is presented as the contents of the View every frame.\n */\nexport class GLView extends React.Component<GLViewProps> {\n static NativeView: any;\n\n static defaultProps = {\n msaaSamples: 4,\n enableExperimentalWorkletSupport: false,\n };\n\n /**\n * Imperative API that creates headless context which is devoid of underlying view.\n * It's useful for headless rendering or in case you want to keep just one context per application and share it between multiple components.\n * It is slightly faster than usual context as it doesn't swap framebuffers and doesn't present them on the canvas,\n * however it may require you to take a snapshot in order to present its results.\n * Also, keep in mind that you need to set up a viewport and create your own framebuffer and texture that you will be drawing to, before you take a snapshot.\n * @return A promise that resolves to WebGL context object. See [WebGL API](#webgl-api) for more details.\n */\n static async createContextAsync(): Promise<ExpoWebGLRenderingContext> {\n const { exglCtxId } = await GLNativeModule.createContextAsync();\n return getGl(exglCtxId);\n }\n\n /**\n * Destroys given context.\n * @param exgl WebGL context to destroy.\n * @return A promise that resolves to boolean value that is `true` if given context existed and has been destroyed successfully.\n */\n static async destroyContextAsync(exgl?: ExpoWebGLRenderingContext | number): Promise<boolean> {\n const exglCtxId = getContextId(exgl);\n unregisterGLContext(exglCtxId);\n return GLNativeModule.destroyContextAsync(exglCtxId);\n }\n\n /**\n * Takes a snapshot of the framebuffer and saves it as a file to app's cache directory.\n * @param exgl WebGL context to take a snapshot from.\n * @param options\n * @return A promise that resolves to `GLSnapshot` object.\n */\n static async takeSnapshotAsync(\n exgl?: ExpoWebGLRenderingContext | number,\n options: SnapshotOptions = {}\n ): Promise<GLSnapshot> {\n const exglCtxId = getContextId(exgl);\n return GLNativeModule.takeSnapshotAsync(exglCtxId, options);\n }\n\n /**\n * This method doesn't work inside of the worklets with new reanimated versions.\n * @deprecated Use `getWorkletContext` from the global scope instead.\n */\n static getWorkletContext: (contextId: number) => ExpoWebGLRenderingContext | undefined =\n workletContextManager.getContext;\n\n nativeRef: ComponentOrHandle = null;\n exglCtxId?: number;\n\n render() {\n const { onContextCreate, msaaSamples, enableExperimentalWorkletSupport, ...viewProps } =\n this.props;\n\n return (\n <View {...viewProps}>\n <NativeView\n ref={this._setNativeRef}\n style={{\n flex: 1,\n ...(Platform.OS === 'ios'\n ? {\n backgroundColor: 'transparent',\n }\n : {}),\n }}\n onSurfaceCreate={this._onSurfaceCreate}\n enableExperimentalWorkletSupport={enableExperimentalWorkletSupport}\n msaaSamples={Platform.OS === 'ios' ? msaaSamples : undefined}\n />\n </View>\n );\n }\n\n _setNativeRef = (nativeRef: ComponentOrHandle): void => {\n if (this.props.nativeRef_EXPERIMENTAL) {\n this.props.nativeRef_EXPERIMENTAL(nativeRef);\n }\n this.nativeRef = nativeRef;\n };\n\n _onSurfaceCreate = ({ nativeEvent: { exglCtxId } }: SurfaceCreateEvent): void => {\n const gl = getGl(exglCtxId);\n\n this.exglCtxId = exglCtxId;\n\n if (this.props.onContextCreate) {\n this.props.onContextCreate(gl);\n }\n };\n\n componentWillUnmount(): void {\n if (this.exglCtxId) {\n unregisterGLContext(this.exglCtxId);\n }\n }\n\n componentDidUpdate(prevProps: GLViewProps): void {\n if (\n this.props.enableExperimentalWorkletSupport !== prevProps.enableExperimentalWorkletSupport\n ) {\n console.warn('Updating prop enableExperimentalWorkletSupport is not supported');\n }\n }\n\n // @docsMissing\n async createCameraTextureAsync(cameraRefOrHandle: ComponentOrHandle): Promise<WebGLTexture> {\n if (!GLNativeModule.createCameraTextureAsync) {\n throw new UnavailabilityError('expo-gl', 'createCameraTextureAsync');\n }\n\n const { exglCtxId } = this;\n\n if (!exglCtxId) {\n throw new Error(\"GLView's surface is not created yet!\");\n }\n\n const cameraTag = findNodeHandle(cameraRefOrHandle);\n const { exglObjId } = await GLNativeModule.createCameraTextureAsync(exglCtxId, cameraTag);\n return { id: exglObjId } as WebGLTexture;\n }\n\n // @docsMissing\n async destroyObjectAsync(glObject: WebGLObject): Promise<boolean> {\n if (!GLNativeModule.destroyObjectAsync) {\n throw new UnavailabilityError('expo-gl', 'destroyObjectAsync');\n }\n return await GLNativeModule.destroyObjectAsync(glObject.id);\n }\n\n /**\n * Same as static [`takeSnapshotAsync()`](#takesnapshotasyncoptions),\n * but uses WebGL context that is associated with the view on which the method is called.\n * @param options\n */\n async takeSnapshotAsync(options: SnapshotOptions = {}): Promise<GLSnapshot> {\n if (!GLView.takeSnapshotAsync) {\n throw new UnavailabilityError('expo-gl', 'takeSnapshotAsync');\n }\n const { exglCtxId } = this;\n return await GLView.takeSnapshotAsync(exglCtxId, options);\n }\n}\n\nGLView.NativeView = NativeView;\n\nfunction unregisterGLContext(exglCtxId: number) {\n if (global.__EXGLContexts) {\n delete global.__EXGLContexts[String(exglCtxId)];\n }\n workletContextManager.unregister?.(exglCtxId);\n}\n\n// Get the GL interface from an EXGLContextId\nconst getGl = (exglCtxId: number): ExpoWebGLRenderingContext => {\n if (!global.__EXGLContexts) {\n throw new CodedError(\n 'ERR_GL_NOT_AVAILABLE',\n 'GL is currently not available. (Have you enabled remote debugging? GL is not available while debugging remotely.)'\n );\n }\n const gl = global.__EXGLContexts[String(exglCtxId)];\n\n configureLogging(gl);\n\n return gl;\n};\n\nconst getContextId = (exgl?: ExpoWebGLRenderingContext | number): number => {\n const exglCtxId = exgl && typeof exgl === 'object' ? exgl.contextId : exgl;\n\n if (!exglCtxId || typeof exglCtxId !== 'number') {\n throw new Error(`Invalid EXGLContext id: ${String(exglC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C,EAAU,EAAE;IACzE,MAAM,SAAS,GAAG,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IAE3E,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import {\n UnavailabilityError,\n requireNativeModule,\n requireNativeViewManager,\n CodedError,\n} from 'expo-modules-core';\nimport * as React from 'react';\nimport { Platform, View, findNodeHandle } from 'react-native';\n\nimport { configureLogging } from './GLUtils';\nimport type {\n ComponentOrHandle,\n SurfaceCreateEvent,\n GLSnapshot,\n ExpoWebGLRenderingContext,\n SnapshotOptions,\n GLViewProps,\n} from './GLView.types';\nimport { createWorkletContextManager } from './GLWorkletContextManager';\n\n// @docsMissing\nexport type WebGLObject = {\n id: number;\n};\n\ndeclare let global: any;\n\nconst GLNativeModule = requireNativeModule('ExpoGL');\nconst NativeView = requireNativeViewManager('ExpoGL');\nconst workletContextManager = createWorkletContextManager();\n\nexport function getWorkletContext(contextId: number): ExpoWebGLRenderingContext | undefined {\n 'worklet';\n return workletContextManager.getContext(contextId);\n}\n\n// @needsAudit\n/**\n * A View that acts as an OpenGL ES render target. On mounting, an OpenGL ES context is created.\n * Its drawing buffer is presented as the contents of the View every frame.\n */\nexport class GLView extends React.Component<GLViewProps> {\n static NativeView: any;\n\n static defaultProps = {\n msaaSamples: 4,\n enableExperimentalWorkletSupport: false,\n };\n\n /**\n * Imperative API that creates headless context which is devoid of underlying view.\n * It's useful for headless rendering or in case you want to keep just one context per application and share it between multiple components.\n * It is slightly faster than usual context as it doesn't swap framebuffers and doesn't present them on the canvas,\n * however it may require you to take a snapshot in order to present its results.\n * Note that the context created using `createContextAsync` has to be destroyed using `destroyContextAsync`.\n * Also, keep in mind that you need to set up a viewport and create your own framebuffer and texture that you will be drawing to, before you take a snapshot.\n * @return A promise that resolves to WebGL context object. See [WebGL API](#webgl-api) for more details.\n */\n static async createContextAsync(): Promise<ExpoWebGLRenderingContext> {\n const { exglCtxId } = await GLNativeModule.createContextAsync();\n return getGl(exglCtxId);\n }\n\n /**\n * Destroys given context. This method is intended to use to destroy headless context created with `createContextAsync`.\n * @param exgl WebGL context to destroy.\n * @return A promise that resolves to boolean value that is `true` if given context existed and has been destroyed successfully.\n */\n static async destroyContextAsync(exgl?: ExpoWebGLRenderingContext | number): Promise<boolean> {\n const exglCtxId = getContextId(exgl);\n unregisterGLContext(exglCtxId);\n return GLNativeModule.destroyContextAsync(exglCtxId);\n }\n\n /**\n * Takes a snapshot of the framebuffer and saves it as a file to app's cache directory.\n * @param exgl WebGL context to take a snapshot from.\n * @param options\n * @return A promise that resolves to `GLSnapshot` object.\n */\n static async takeSnapshotAsync(\n exgl?: ExpoWebGLRenderingContext | number,\n options: SnapshotOptions = {}\n ): Promise<GLSnapshot> {\n const exglCtxId = getContextId(exgl);\n return GLNativeModule.takeSnapshotAsync(exglCtxId, options);\n }\n\n /**\n * This method doesn't work inside of the worklets with new reanimated versions.\n * @deprecated Use `getWorkletContext` from the global scope instead.\n */\n static getWorkletContext: (contextId: number) => ExpoWebGLRenderingContext | undefined =\n workletContextManager.getContext;\n\n nativeRef: ComponentOrHandle = null;\n exglCtxId?: number;\n\n render() {\n const { onContextCreate, msaaSamples, enableExperimentalWorkletSupport, ...viewProps } =\n this.props;\n\n return (\n <View {...viewProps}>\n <NativeView\n ref={this._setNativeRef}\n style={{\n flex: 1,\n ...(Platform.OS === 'ios'\n ? {\n backgroundColor: 'transparent',\n }\n : {}),\n }}\n onSurfaceCreate={this._onSurfaceCreate}\n enableExperimentalWorkletSupport={enableExperimentalWorkletSupport}\n msaaSamples={Platform.OS === 'ios' ? msaaSamples : undefined}\n />\n </View>\n );\n }\n\n _setNativeRef = (nativeRef: ComponentOrHandle): void => {\n if (this.props.nativeRef_EXPERIMENTAL) {\n this.props.nativeRef_EXPERIMENTAL(nativeRef);\n }\n this.nativeRef = nativeRef;\n };\n\n _onSurfaceCreate = ({ nativeEvent: { exglCtxId } }: SurfaceCreateEvent): void => {\n const gl = getGl(exglCtxId);\n\n this.exglCtxId = exglCtxId;\n\n if (this.props.onContextCreate) {\n this.props.onContextCreate(gl);\n }\n };\n\n componentWillUnmount(): void {\n if (this.exglCtxId) {\n unregisterGLContext(this.exglCtxId);\n }\n }\n\n componentDidUpdate(prevProps: GLViewProps): void {\n if (\n this.props.enableExperimentalWorkletSupport !== prevProps.enableExperimentalWorkletSupport\n ) {\n console.warn('Updating prop enableExperimentalWorkletSupport is not supported');\n }\n }\n\n // @docsMissing\n async createCameraTextureAsync(cameraRefOrHandle: ComponentOrHandle): Promise<WebGLTexture> {\n if (!GLNativeModule.createCameraTextureAsync) {\n throw new UnavailabilityError('expo-gl', 'createCameraTextureAsync');\n }\n\n const { exglCtxId } = this;\n\n if (!exglCtxId) {\n throw new Error(\"GLView's surface is not created yet!\");\n }\n\n const cameraTag = findNodeHandle(cameraRefOrHandle);\n const { exglObjId } = await GLNativeModule.createCameraTextureAsync(exglCtxId, cameraTag);\n return { id: exglObjId } as WebGLTexture;\n }\n\n // @docsMissing\n async destroyObjectAsync(glObject: WebGLObject): Promise<boolean> {\n if (!GLNativeModule.destroyObjectAsync) {\n throw new UnavailabilityError('expo-gl', 'destroyObjectAsync');\n }\n return await GLNativeModule.destroyObjectAsync(glObject.id);\n }\n\n /**\n * Same as static [`takeSnapshotAsync()`](#takesnapshotasyncoptions),\n * but uses WebGL context that is associated with the view on which the method is called.\n * @param options\n */\n async takeSnapshotAsync(options: SnapshotOptions = {}): Promise<GLSnapshot> {\n if (!GLView.takeSnapshotAsync) {\n throw new UnavailabilityError('expo-gl', 'takeSnapshotAsync');\n }\n const { exglCtxId } = this;\n return await GLView.takeSnapshotAsync(exglCtxId, options);\n }\n}\n\nGLView.NativeView = NativeView;\n\nfunction unregisterGLContext(exglCtxId: number) {\n if (global.__EXGLContexts) {\n delete global.__EXGLContexts[String(exglCtxId)];\n }\n workletContextManager.unregister?.(exglCtxId);\n}\n\n// Get the GL interface from an EXGLContextId\nconst getGl = (exglCtxId: number): ExpoWebGLRenderingContext => {\n if (!global.__EXGLContexts) {\n throw new CodedError(\n 'ERR_GL_NOT_AVAILABLE',\n 'GL is currently not available. (Have you enabled remote debugging? GL is not available while debugging remotely.)'\n );\n }\n const gl = global.__EXGLContexts[String(exglCtxId)];\n\n configureLogging(gl);\n\n return gl;\n};\n\nconst getContextId = (exgl?: ExpoWebGLRenderingContext | number): number => {\n const exglCtxId = exgl && typeof exgl === 'object' ? exgl.contextId : exgl;\n\n if (!exglCtxId || typeof exglCtxId !== 'number') {\n throw new Error(`Invalid EXGLContext id: ${String(exglCtxId)}`);\n }\n return exglCtxId;\n};\n"]}
@@ -9,7 +9,7 @@
9
9
  "publication": {
10
10
  "groupId": "host.exp.exponent",
11
11
  "artifactId": "expo.modules.gl",
12
- "version": "57.0.0",
12
+ "version": "57.0.1",
13
13
  "repository": "local-maven-repo"
14
14
  }
15
15
  }
@@ -0,0 +1 @@
1
+ 3892b8c11d8ab617bbbf926e443954d3c0a20c72
@@ -0,0 +1 @@
1
+ e13cf94e631200b94b6a0d61ebfb3b26d1d9a1ec0e5e3e8d7a0ab69df5b12aff
@@ -0,0 +1 @@
1
+ 6040b5a97d4c97f0f943ddeb2cd7587dbe4e925317342b896d610ce53ed1c4cac6e69d0d589263b56f015c9b9dd816a383d1ba5f0f7c1d3e4c36fdd97cdb4544
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.gl",
6
- "version": "57.0.0",
6
+ "version": "57.0.1",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.gl-57.0.0.aar",
28
- "url": "expo.modules.gl-57.0.0.aar",
29
- "size": 970986,
30
- "sha512": "61674f526c1c72eddb3a585974ff065f0fde979a2eeb2c2e4993e667417550a812ba2783a0cfa0641e67076d41f48924193669e38ed12800fb288bd4a1cbda55",
31
- "sha256": "7728b5d34f8eccf925837b9da0f5bd337c02a4c2f2fc93554d0e15855941c066",
32
- "sha1": "57fe558d3ce2dc0757cc391176a147b0c20fd6ca",
33
- "md5": "de1716362dbe469f6313ef2329527868"
27
+ "name": "expo.modules.gl-57.0.1.aar",
28
+ "url": "expo.modules.gl-57.0.1.aar",
29
+ "size": 970987,
30
+ "sha512": "6040b5a97d4c97f0f943ddeb2cd7587dbe4e925317342b896d610ce53ed1c4cac6e69d0d589263b56f015c9b9dd816a383d1ba5f0f7c1d3e4c36fdd97cdb4544",
31
+ "sha256": "e13cf94e631200b94b6a0d61ebfb3b26d1d9a1ec0e5e3e8d7a0ab69df5b12aff",
32
+ "sha1": "3892b8c11d8ab617bbbf926e443954d3c0a20c72",
33
+ "md5": "bdfa4fd1b4a8003fca9a4975f74416bf"
34
34
  }
35
35
  ]
36
36
  },
@@ -67,13 +67,13 @@
67
67
  ],
68
68
  "files": [
69
69
  {
70
- "name": "expo.modules.gl-57.0.0.aar",
71
- "url": "expo.modules.gl-57.0.0.aar",
72
- "size": 970986,
73
- "sha512": "61674f526c1c72eddb3a585974ff065f0fde979a2eeb2c2e4993e667417550a812ba2783a0cfa0641e67076d41f48924193669e38ed12800fb288bd4a1cbda55",
74
- "sha256": "7728b5d34f8eccf925837b9da0f5bd337c02a4c2f2fc93554d0e15855941c066",
75
- "sha1": "57fe558d3ce2dc0757cc391176a147b0c20fd6ca",
76
- "md5": "de1716362dbe469f6313ef2329527868"
70
+ "name": "expo.modules.gl-57.0.1.aar",
71
+ "url": "expo.modules.gl-57.0.1.aar",
72
+ "size": 970987,
73
+ "sha512": "6040b5a97d4c97f0f943ddeb2cd7587dbe4e925317342b896d610ce53ed1c4cac6e69d0d589263b56f015c9b9dd816a383d1ba5f0f7c1d3e4c36fdd97cdb4544",
74
+ "sha256": "e13cf94e631200b94b6a0d61ebfb3b26d1d9a1ec0e5e3e8d7a0ab69df5b12aff",
75
+ "sha1": "3892b8c11d8ab617bbbf926e443954d3c0a20c72",
76
+ "md5": "bdfa4fd1b4a8003fca9a4975f74416bf"
77
77
  }
78
78
  ]
79
79
  },
@@ -87,8 +87,8 @@
87
87
  },
88
88
  "files": [
89
89
  {
90
- "name": "expo.modules.gl-57.0.0-sources.jar",
91
- "url": "expo.modules.gl-57.0.0-sources.jar",
90
+ "name": "expo.modules.gl-57.0.1-sources.jar",
91
+ "url": "expo.modules.gl-57.0.1-sources.jar",
92
92
  "size": 12222,
93
93
  "sha512": "0f8d330c85629629bc0c5fe8373ce7e4d2e24720c45ef711ebabf2814d0ffc0de9be7ae71964abd211055fbba194c5c1d389a09020096d3a924e01d818125031",
94
94
  "sha256": "3e07f19fe60bbbe25f2df865c8dee91ee9274a2322421f7604c81e8a95424337",
@@ -0,0 +1 @@
1
+ 05f361c7fc5810c2780644b889b134ccf8b0a330
@@ -0,0 +1 @@
1
+ 2171c04ee518100effbd6033c62f2578a22cf4acb8fbf8d5a95637d85eb8e81f
@@ -0,0 +1 @@
1
+ 67fc2fda7e1d5286673b5333d7730ef0ec8060390b445a698fa6832dc7af9df3f6b78c5dc4f49180b78733beab074ae34319c560a0e77e185a15d66191105c1e
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.gl</artifactId>
12
- <version>57.0.0</version>
12
+ <version>57.0.1</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.gl</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ d5d838eee19826b28dc7d9b52a8769ccf0541b26
@@ -0,0 +1 @@
1
+ 3f13f182e0c55c446dd8c221cfb3c58e9b28505a68eb7c1c5db72f0932996c1e
@@ -0,0 +1 @@
1
+ f24f04d65c26867131502dde56f17ae50e4fbde0cb87a10dbb1a14615b7b99d286d13f0792235bb38ed21abb968c0894b7ce3b5a1aa96b98a236c7c0d3a59b70
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.gl</artifactId>
5
5
  <versioning>
6
- <latest>57.0.0</latest>
7
- <release>57.0.0</release>
6
+ <latest>57.0.1</latest>
7
+ <release>57.0.1</release>
8
8
  <versions>
9
- <version>57.0.0</version>
9
+ <version>57.0.1</version>
10
10
  </versions>
11
- <lastUpdated>20260625191742</lastUpdated>
11
+ <lastUpdated>20260630180812</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 702d11f99f3936c7f79b20c763f88340
1
+ 8e9f5b8d0e5f94990ded18e48189c140
@@ -1 +1 @@
1
- 22b5bf3aee0b6ac48a69203f21d534b83ccd19ae
1
+ 88c4b9b100a1a3d517092a865d4701c6544c8ede
@@ -1 +1 @@
1
- 1733afcbaa999558b68913626fc80d1fce33d293707310738e06e38c905ea033
1
+ 0321393b4a8d5cba2b6d87855ab3cea1ba549f6a9e6d4e315ece4495a5dad207
@@ -1 +1 @@
1
- 8d5589a19e75cbe2d07f4fa0f0b0e54d8319273c5281c7dbe59519cb6ca9466dac3739424b1ecb8097288005eb9be76af0c3b1f18004b9ebaa4264bfec1257fb
1
+ 52c56cd80561f2950f656d49753aec8c3d7952158d78a2e17fccb4a250a1291cf2dd3044f0226da16a96e27358de223eee627f7c4ae47546a6728eb8a9252a97
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-gl",
3
- "version": "57.0.0",
3
+ "version": "57.0.1",
4
4
  "description": "Provides GLView that acts as OpenGL ES render target and gives GL context object implementing WebGL 2.0 specification.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "@types/react-test-renderer": "^19.1.0",
37
37
  "@types/webgl2": "^0.0.6",
38
38
  "react-test-renderer": "19.2.0",
39
- "expo": "57.0.0-preview.0",
39
+ "expo": "57.0.0",
40
40
  "expo-module-scripts": "56.0.3"
41
41
  },
42
42
  "peerDependencies": {
@@ -58,7 +58,7 @@
58
58
  "optional": true
59
59
  }
60
60
  },
61
- "gitHead": "e3eb896c5fdcd89e0cded98ff4e35c9db12cc9c0",
61
+ "gitHead": "ab82681fbcef61d5283c1938290ba5cfe42e9cfd",
62
62
  "scripts": {
63
63
  "build": "expo-module build",
64
64
  "clean": "expo-module clean",
package/src/GLView.tsx CHANGED
@@ -52,6 +52,7 @@ export class GLView extends React.Component<GLViewProps> {
52
52
  * It's useful for headless rendering or in case you want to keep just one context per application and share it between multiple components.
53
53
  * It is slightly faster than usual context as it doesn't swap framebuffers and doesn't present them on the canvas,
54
54
  * however it may require you to take a snapshot in order to present its results.
55
+ * Note that the context created using `createContextAsync` has to be destroyed using `destroyContextAsync`.
55
56
  * Also, keep in mind that you need to set up a viewport and create your own framebuffer and texture that you will be drawing to, before you take a snapshot.
56
57
  * @return A promise that resolves to WebGL context object. See [WebGL API](#webgl-api) for more details.
57
58
  */
@@ -61,7 +62,7 @@ export class GLView extends React.Component<GLViewProps> {
61
62
  }
62
63
 
63
64
  /**
64
- * Destroys given context.
65
+ * Destroys given context. This method is intended to use to destroy headless context created with `createContextAsync`.
65
66
  * @param exgl WebGL context to destroy.
66
67
  * @return A promise that resolves to boolean value that is `true` if given context existed and has been destroyed successfully.
67
68
  */
@@ -1 +0,0 @@
1
- 57fe558d3ce2dc0757cc391176a147b0c20fd6ca
@@ -1 +0,0 @@
1
- 7728b5d34f8eccf925837b9da0f5bd337c02a4c2f2fc93554d0e15855941c066
@@ -1 +0,0 @@
1
- 61674f526c1c72eddb3a585974ff065f0fde979a2eeb2c2e4993e667417550a812ba2783a0cfa0641e67076d41f48924193669e38ed12800fb288bd4a1cbda55
@@ -1 +0,0 @@
1
- aebc38addcfac7c63380fd700d3e3ea38875e2d0
@@ -1 +0,0 @@
1
- e3a1551a820e512ec9c48a8e1584224d0fed5bd8ca77d3a2881a57c7ebd87e4a
@@ -1 +0,0 @@
1
- ecf5cb72cda07d5d929dd8a8cfacc3c2f2e491e724a3fa2d3a30f776df417da0c89e73d864a55227e4a18b94c53c3d036f4ca84f24089b376fef639168716e27
@@ -1 +0,0 @@
1
- 1026b80a31a56613dac36613065695a1e95eb768
@@ -1 +0,0 @@
1
- f40a37e783fe32fc7a1a6c2e27e28f614684a167feb691f93f5001ced677074a
@@ -1 +0,0 @@
1
- 3db0c6eed1a257d023457d3b910c1cc3ca74e3525157b8e31d691c2c1e6729ec77b78e187c4bb7e34148637d4d7a992854fe0ad59f1be846e09a59417066877f