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
Fix issue with preparing Graphics without shader #6540
Conversation
_resolveDirectShader is needed in a renderer parameter, otherwise it will fail [there|https://github.com/pixijs/pixi.js/blob/dev/packages/graphics/src/Graphics.ts#L1157]
oops :) |
@@ -67,7 +67,7 @@ function uploadGraphics(renderer: AbstractRenderer | BasePrepare, item: IDisplay | |||
// if its not batchable - update vao for particular shader | |||
if (!geometry.batchable) | |||
{ | |||
(renderer as Renderer).geometry.bind(geometry, (item as any)._resolveDirectShader()); | |||
(renderer as Renderer).geometry.bind(geometry, (item as any)._resolveDirectShader((renderer as Renderer))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is item
cast as any? We should have caught this issue way sooner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some kind of legacy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think was just an issue with with this package being converted to TypeScript #6481. We should followup with a PR, that creates an Interface for batchable objects.
_resolveDirectShader is needed in a renderer parameter, otherwise it will fail there
Description of change
Just passing down renderer to the _resolveDirectShader.
Pre-Merge Checklist
npm run lint
)npm run test
)