[React Native] engine.createRenderTargetCube - undefined is not an object (evaluating gl.TEXTURE_CUBE_MAP)

Hello everyone,

Versions:

  • @babylon/js/core -> 5.21.0
  • @babylonjs/react-native-iosandroid-0-65

My project is using react native (iOS) and I’m getting an error while running a sample code with a reflection probe:

The full error is:

TypeError: undefined is not an object (evaluating 'gl.TEXTURE_CUBE_MAP')

ThinEngine.prototype.createRenderTargetCubeTexture
-> engine.renderTargetCube.js:20:33
RenderTargetTexture
-> renderTargetTexture.js:148:39
ReflectionProbe
-> reflectionProbe.js:75:37
[...]

Hi @clem
Rendering to a cubemap is not currently supported in BabylonNative/BabylonReactNative
We have to ETA yet. Sorry for that.

1 Like

Hey @Cedric, thanks for the quick response, I’m curious, is the work required to support this significant? I can consider doing a patch if you point me in the right direction. In the meantime, I’m thinking of generating the environment file offline (maybe that can actually be done with the babylon web editor?).

It’s quite a difficult change. I’ve started a PR some time ago :

But I didn’t finish it (priorities…)
I think @sebavan worked on env file filtering some time ago.

1 Like