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

Fix issue with preparing Graphics without shader #6540

Merged
merged 2 commits into from Apr 10, 2020

Conversation

YuryKuvetski
Copy link
Contributor

_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
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)

_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]
@ivanpopelyshev
Copy link
Collaborator

oops :)

@bigtimebuddy bigtimebuddy added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label Apr 10, 2020
@@ -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)));
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some kind of legacy?

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏰ Future Work Reminder for ourselves to flag work that doesn't make sense to do right now. ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants