-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Is sharing webgl context not supported? #8147
Comments
Additionally, passing 3js context to pixi instead leaves it in good shape, as it seems, so the problem must be on 3js side? |
The problem seems to be in WebGLRenderer's setDefaultGLState() that I can't opt out of... If I disable WebGLState init, the bunny lives. |
Ok, so it looks like the best workaround is to manually set proper context state before each lib's render call. However, this is not all there is to the story, I will be spamming this issue with uniform location errors soon, stay tuned 😉 |
Here goes: https://jsfiddle.net/psgvteg0/5/ As you see, pixi's bunny rotation actually mangles 3D cube, and you have a bunch of errors in the console: |
Ok, after rtfm-ing in #5278 I have used this advice:
https://jsfiddle.net/psgvteg0/6/ there is now only one invalid location: WebGL: INVALID_OPERATION: uniformMatrix3fv: location is not from current program |
Oh wait, this one is in pixi, I guess three.js is cleared. |
✌ |
Yeah 🎉Leaving working combo link in case someone will end up reading here. |
Here is a demo of pixi spinning bunny + creating three.js renderer. If you uncomment a single line of three.js code, the bunny dies.
The text was updated successfully, but these errors were encountered: