gre / gl-react

gl-react – React library to write and compose WebGL shaders

Home Page:https://gl-react-cookbook.surge.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setState Refresh, black screen

songxiaoliang opened this issue · comments

simulator screen shot - iphone 6 - 2018-04-12 at 12 22 36
Click on the item below to refresh the above display. There will be a black screen problem. How to solve it?

"gl-react": "^3.13.0",
"gl-react-image": "^3.1.1",
"gl-react-native": "^3.13.0",

this is a setState that changes the shader?
it seems black screen issues has been reported many times in react-native-webgl, maybe it's related 🤔

@gre Yes, when I click on the sample at the bottom, it will refresh the big picture above, but there will be a black screen, I do not know how to solve?

@gre Need to click several times repeatedly to render

that sounds like a bug in the texture loader, on the implementation side (react-native-webgl in your case).
i'm not sure how to fix it, need to investigate more

I'm having the same problem. Everything works on the iOS simulator, but on the device, it won't refresh properly and I get a black screen.

If I change the state for the second time and cause a re-render, it will refresh properly though.

Is there any progress on this?

Are there any known workarounds, did this work on earlier versions? I tried a ton of different hacks and nothing seems to work :/

@dinotrnka I don't have a better solution right now.

Please check on latest implementation (v4), this should be fixed. if not we can reopen and i would need a minimal reproductible example.

thanks