rnc-archive / react-native-webgl

DEPRECATED: use expo-gl – Implements WebGL for react-native
296 stars 73 forks source link

RN0.44.3 Crash #40

Closed laclys closed 4 years ago

laclys commented 6 years ago

init new RN0.44.3 project

try

import React, { Component } from "react";
import { WebGLView } from "react-native-webgl";
class RedSquareWebGL extends Component {
  onContextCreate = (gl: WebGLRenderingContext) => {
    const rngl = gl.getExtension("RN");
    gl.clearColor(1, 0, 0, 1);
    gl.clear(gl.COLOR_BUFFER_BIT);
    rngl.endFrame();
  };
  render() {
    return (
      <WebGLView
        style={{ width: 100, height: 100 }}
        onContextCreate={this.onContextCreate}
      />
    );
  }
}

Crash!

Any advice would be appreciated

Morphinity commented 5 years ago

Anyone resolved this? The app loads, shows a white 100 * 100 white surface and then crashes.

JuicyPasta commented 5 years ago

Experiencing the same issue, I don't see any sort of error messages in the JS or native threads.