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 particle ia reuse #7267

Merged
merged 3 commits into from Sep 2, 2020
Merged

fix particle ia reuse #7267

merged 3 commits into from Sep 2, 2020

Conversation

LinYunMo
Copy link
Contributor

@LinYunMo LinYunMo commented Sep 1, 2020

ia.indexCount = this._indexCount * count;
this._iaInfo.drawInfos[0] = ia;
this._iaInfo.drawInfos[0].firstIndex = 0;
this._iaInfo.drawInfos[0].indexCount = this._indexCount * count;
this._iaInfoBuffer.update(this._iaInfo);
Copy link
Contributor

Choose a reason for hiding this comment

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

这个修改是改的什么问题?trailModel 也是同样的处理,看是否需要一起修改

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个是由于 ia 是复用对象,从池中取出的,这里之前直接引用了对象,但这个对象不一定是它自己的 ia,所以会错误修改

@pandamicro pandamicro merged commit 883a057 into cocos:3d-v1.2 Sep 2, 2020
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

Successfully merging this pull request may close these issues.

None yet

4 participants