question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[gl-react-expo] app freezes and image isn't rendered

See original GitHub issue

bug report

library version

"expo": "^17.0.0",
"gl-react": "^3.6.0",
"gl-react-expo": "^3.6.0"

Steps to reproduce the behavior

Trying to make work simple example given in README. On IOS Simulator app freezes and image is not rendered. On Android device app is working, but image isn’t rendered also. Here is the code:

import React from 'react';
import { Shaders, Node, GLSL } from 'gl-react';
const shaders = Shaders.create({
  helloBlue: {
    frag: GLSL`
precision highp float;
varying vec2 uv;
uniform float blue;
void main() {
  gl_FragColor = vec4(uv.x, uv.y, blue, 1.0);
}`
  }
});
class HelloBlue extends React.Component {
  render() {
    const { blue } = this.props;
    return <Node shader={shaders.helloBlue} uniforms={{ blue }} />;
  }
}

export default HelloBlue;

And

import React, { Component } from 'react';
import { Surface } from 'gl-react-expo';
import HelloBlue from '../components/blue/HelloBlue';

class FeedScreen extends Component {
  render() {
    return (
      <Surface width={300} height={300}>
        <HelloBlue blue={0.5} />
      </Surface>
    );
  }
}

export default FeedScreen;

I’m pretty new to react-native, maybe I’m doing smth wrong.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
josephmaximcommented, Jun 6, 2017

@DaniyarJakupov try changing your render method to this:

class FeedScreen extends Component {
  render() {
    return (
      <Surface style={{width: 300, height: 300}}> // Change to style
        <HelloBlue blue={0.5} />
      </Surface>
    );
  }
}

0reactions
farazirfan47commented, Jun 3, 2020

same happening with me @im-hamza-dev

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expo Go crashes when using captureRef without logging ...
I wish to use captureRef to save the image with the overlay, but when ever I try this Expo Go crashes without leaving...
Read more >
gl-react/Lobby - Gitter
Hi everyone I'm having this issue. One of the sources for assign has an enumerable key on the prototype chain. Are you trying...
Read more >
GLView - Expo Documentation
GLView. expo-gl provides a View that acts as an OpenGL ES render target, useful for rendering 2D and 3D graphics. On mounting, an...
Read more >
Couldn't be opened because you don't have permission to ...
Coding example for the question Couldn't be opened because you don't have permission to view it - React Native - Expo?
Read more >
detachpreviousscreen - You.com | The Search Engine You Control
Only applicable if detachInactiveScreens isn't set to false. ... Mysterious random delay in loading content in React Native Expo app.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found