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
Multiple PIXI.Stage's on one page #23
Comments
Interesting use case! The issue lies with the fact that the pixi.js texture cache stores textures but only for one webGL context. At the moment you cant use the same texture in multiple contexts as each instance of webGL requires its own one. If you dont use the texture cache it works all good.. A possible solution could be to create a new texture cache for each instance of a webGL renderer.. |
I see, very good. Creating a new texture cache for each instance will work perfect. Thanks for the help! |
Happy to help :) |
As I put this into practice, I'm still getting that error. I think it might have something to do with when the WebGLRenderer render method runs? http://jsfiddle.net/tolmark12/zmJtD/3/ Uncommenting line 15 fixes the problem in the jsFiddle example, but doesn't fix the issue in my app (even though the implementations are essentially the same). I'm wondering if it is because there is a lot more javascript running elsewhere on my app's page which somehow causes the renderer to lag before rendering? I'm shooting in the dark here, but does this spark any thoughts? |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When I have more than one pixi stage on a page that uses textured sprites, the first stage renders the sprite just fine, however the second throws the error:
Here's an example, once it loads, click run with the console open:
http://jsfiddle.net/tolmark12/dDWD9/1/ (coffeescript)
edit : updated js fiddle link
The text was updated successfully, but these errors were encountered: