expo / expo-three

Utilities for using THREE.js on Expo
MIT License
738 stars 89 forks source link

Ignore `gl.pixelStorei` warning #293

Closed Josema closed 1 year ago

Josema commented 1 year ago

I am getting this error every time I load a texture. LOG ABI48_0_0EXGL: gl.pixelStorei() doesn't support this parameter yet!

I load hundred of textures, is there any way to ignore or solve this issue? It makes my console.log unusable.

kevinhu commented 1 year ago

This fix worked for me:

<Canvas
onCreated={(state) => {
  const _gl = state.gl.getContext();
  const pixelStorei = _gl.pixelStorei.bind(_gl);
  _gl.pixelStorei = function (...args) {
    const [parameter] = args;
    switch (parameter) {
      case _gl.UNPACK_FLIP_Y_WEBGL:
        return pixelStorei(...args);
    }
  };
}}
/>
Josema commented 1 year ago

It works, thank you.

didemkkaslan commented 2 months ago

worked for me too!

thansk