Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White screen after changing Surface width/height in gl-react-native #228

Closed
QuevedoIB opened this issue Jan 14, 2020 · 3 comments
Closed
Labels
Expo this is related to Expo

Comments

@QuevedoIB
Copy link

QuevedoIB commented Jan 14, 2020

"gl-react": "^4.0.1",
"gl-react-image": "^3.1.1",
"gl-react-instagramfilters": "^0.2.0",
"gl-react-native": "^4.0.1",

Latest version of gl-react and gl-react-native.

Expected behavior

Changing Surface style (height and width) should change sizes and rerender.

Actual behavior

Surface randomly disappears after changing the sizes.

Steps to reproduce the behavior

Change state and pass different props to Surface component.

Anyone had a similar problem and has any idea of what could be the reason?

@gre
Copy link
Owner

gre commented Jan 19, 2020

I wrote a test example in cookbook-rn "resizing" and manage to reproduce something weird. I have a slider that control the surface size, and strangely the canvas manage to properly re-render only half of the time. I wonder if it's some inner properties of Expo GLView that defer a bit the resizing and therefore empty the canvas content a bit after our redraw logic updates.

maybe i need to write the redraw logic not in a "DidUpdate" but in a "after layout" or something?

any clue @nikki93 / @sjchmiela ?

thanks

@QuevedoIB
Copy link
Author

Any update on this? @gre @nikki93 @sjchmiela

@gre gre added the Expo this is related to Expo label Dec 27, 2020
@gre
Copy link
Owner

gre commented Dec 27, 2020

I'll close this in favor of #288 because it's a more up to date version of the current situation on latest expo (it no longer resize at all)

@gre gre closed this as completed Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expo this is related to Expo
Projects
None yet
Development

No branches or pull requests

2 participants