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

Bug: Using a eraser, when the webgl device is lost and cannot be restored #10497

Closed
yungzhu opened this issue Apr 30, 2024 · 1 comment
Closed

Comments

@yungzhu
Copy link
Contributor

yungzhu commented Apr 30, 2024

Current Behavior

Implement a eraser function, but unable to restore context

Expected Behavior

https://www.pixiplayground.com/#/edit/QHv0al2HxtGV1tf-ac1Cw

Steps to Reproduce

click the sprite,can not show again

Environment

  • pixi.js version: e.g. 8.1.0
  • Browser & Version: e.g. Chrome 108
  • OS & Version: e.g. Ubuntu 22.04
  • Running Example: e.g. https://pixiplayground.com/

Possible Solution

No response

Additional Information

No response

@GoodBoyDigital
Copy link
Member

Heya! This is not ideal! but correct behaviour. When a context is lost, all render textures content is lost also. They need to be re-rendered as part of you apps restoring the context process (this is not possible to do from Pixi side unfortunately - we only store the pixels.

Adjusted example: https://www.pixiplayground.com/#/edit/WR3_70RjJZv_oJjMTfgg2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants