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 the problem when the MeshBuffer is switched on the native platform. #206

Open
wants to merge 1 commit into
base: v2.3.0-release
from

Conversation

@caryliu1999
Copy link
Contributor

caryliu1999 commented Nov 15, 2019

Re: cocos-creator/2d-tasks#2078

问题反馈:

https://forum.cocos.org/t/v2-20-mask/85523/13?u=cary

之前因为 Graphics 同步绘制顶点数量超过65535时,会重新创建MeshBuffer导致原生平台之前绘制的内容被重置,故修改为使用同一个MeshBuffer,adapter层会重写MeshBuffer使用RenderDataList来进行buffer数据切换。但是之前更新完RenderDataList之后,没有同步Assembler的IAData,导致切换之后新的数据不会被渲染。

修改说明:

当MeshBuffer由于顶点数量过多进行buffer切换的时候,同步更新Assembler的IAData,在MeshBuffer重置的时候,重置所有的vData数据。

关联PR: cocos-creator/cocos2d-x-lite#1935

@caryliu1999

This comment has been minimized.

Copy link
Contributor Author

caryliu1999 commented Nov 15, 2019

@sunnylanwanjun 看下跟TiledMap那边的处理会不会发生冲突。

@sunnylanwanjun

This comment has been minimized.

Copy link
Contributor

sunnylanwanjun commented Nov 15, 2019

改动有点大了,对原生的MeshBuffer也有修改,tiledmap spine dragonbones 3d mesh sprite 超过65535的处理都需要做详细测试才行,还有边界情况和稳定性的测试,确定要合到2.2.1-release?

@caryliu1999

This comment has been minimized.

Copy link
Contributor Author

caryliu1999 commented Nov 19, 2019

改动有点大了,对原生的MeshBuffer也有修改,tiledmap spine dragonbones 3d mesh sprite 超过65535的处理都需要做详细测试才行,还有边界情况和稳定性的测试,确定要合到2.2.1-release?

那放在2.2.2更新吧

@holycanvas holycanvas changed the base branch from v2.2.1-release to v2.3.0 Nov 29, 2019
@holycanvas holycanvas requested a review from 2youyou2 Dec 25, 2019
@cocos-robot cocos-robot changed the base branch from v2.3.0 to v2.3.0-release Jan 13, 2020
Copy link
Contributor

cocos-robot left a comment

@caryliu1999, v2.3.0 branch will be deleted, so we edited the base branch to v2.3.0-release, or this PR will be killed by GitHub.
Please review the commits history to ensure that the PR does not polluted by unneeded commits from your origin branch.
If you need to merge to other branch, you can first click the Edit button on the right side of the PR title, then switch the base branch.
If necessary, welcome to resubmit a new PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.