Commit Graph

56 Commits

Author SHA1 Message Date
ChiaNing ad09bd6e65 Fix the bug that drawCall is still submitted when opacity is 0 (#14381)
* Fix the bug that drawCall is still submitted when opacity is 0

* use approx
2023-03-01 18:04:41 +08:00
ChiaNing b8a5af9d9f Fix Graphics Index Count Error (#14065) 2023-02-10 10:38:59 +08:00
hyde zhou 857004bc00 [pipeline] refactor custom pipeline init (#14040) 2023-01-13 14:02:46 +08:00
minggo 313c58fe33 Improve utils api doc (#13922) 2022-12-28 15:04:56 +08:00
pandamicro afd22296b4 MIT license update and to new year 2023 (#13927)
* Cpp MIT license update and to date
* TS MIT license update and to date
2022-12-28 11:25:12 +08:00
ChiaNing e95477ef8f fix ui scene add batch bug (#13863)
* fix ui scene add batch bug

* CI

* ci
2022-12-21 10:12:36 +08:00
ChiaNing ddeba2863c Update UIMeshRender model pre frame (#13738) 2022-12-08 15:45:11 +08:00
江战 046a2b1378 Re-impl CC_ASSERT & CC_ASSERTF (#13588) 2022-12-05 17:12:30 +08:00
minggo d77afc3f06 Revert "Hide destructor (#13105)" (#13121)
This reverts commit b5804b58c8.
2022-10-21 18:55:32 +08:00
minggo b5804b58c8 Hide destructor (#13105)
* hide Image destructor

* hide HttpRequest destructor

* hide TextureBufferPool destructor

* hide gfx::Buffer destructor
2022-10-20 16:35:23 +08:00
santy-wang 91c884362d Merge branch 'v3.6.2' of github.com:cocos-creator/engine into v3.6.1-sync 2022-10-11 20:12:14 +08:00
zhakesi a7a924a6ed fix tiled merge draw call with sprite (#12877) 2022-09-26 10:36:24 +08:00
zhakesi c7761e5c19 middleware2d components rendering in native mode (#12788)
* middleware2d components rendering in native mode

* support spine/dragonbones set enable batch

* support spine rendering in batching mode

* get batcher2d instance from root

* process about with type conversion

* fix some code style

* use material hash to merge draw batch

* deal with fill z

* fix dragonbones fill z

* remove some code no used any more

* refactoring some code

* modify some code

* add free memory

* fix clang-tidy

* delete mesh-buffer-layout in destructor

* byte alignment
2022-09-20 13:31:33 +08:00
zhakesi 6de3d10128 remove sync to native FloatsPerVertex (#12721) 2022-09-09 10:56:22 +08:00
zhakesi ef9392829c remove uimeshbuffer sync to native floatsPerVertex (#12722) 2022-09-09 10:55:50 +08:00
minggo aba9fdb63f Merge branch 'v3.6.1' into merge_v3.6.1 2022-09-02 20:08:18 +08:00
ChiaNing 482b20ea47 Mask Refactoring (#12636)
* first version mask

* image stencil material fix

* misc fix

* type change fix

* export fix

* some native code

* native fix

* use less remove

* remove isForMask

* material change

* delate sprite frame

* use less remove

* misc fix

* ci

* mate updte

* de

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-09-02 10:17:44 +08:00
zhakesi a388541901 spine/dragonbones renderdata use rgba8 color format (#12619)
* add color4b format

* render-2d adapter color format

* spine dragonbones use simple color

* rename V3F_T2F_C4B

* use attributes to init mesh buffer

* remove Vertex2DFormat
2022-09-01 21:44:19 +08:00
Zhang mingzhen 0410f097e1 particle local mode on native (#12624)
* particle local mode on native

* remove rebundant code

* when positionType changes, update entity data

* move to onEnable

* rename as renderTransform

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-09-01 11:35:19 +08:00
ChiaNing febb0d9bf9 change render entity enable default value (#12488)
Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-08-22 10:56:10 +08:00
minggo 5778aab354 Merge branch 'v3.6.0' into merge_v3.6 2022-08-08 10:49:46 +08:00
Zhang mingzhen c9be479827 fix memory leak and move it into private area (#12339)
* fix memory leak and move it into private area

* revert moving to private

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-08-05 10:48:20 +08:00
Zhang mingzhen 7bbce32970 static drawinfo should be reset when flushing assembler (#12333)
* static drawinfo should be reset  when flushing assembler

* add reset drawinfo method

* revert mistake

* fix mistakes

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-08-04 22:14:23 +08:00
zhakesi dc91a469ae use native middleware buffer (#12233)
* use native middleware buffer

* fix clang-tidy

* fix clang-tidy

* set useLinkData as meshBuffer's property

* refactoring some code

* set 2d.ini

* fix word component

* fix clip middleware2d

* ...

* function attributes to getAttributes
2022-07-28 19:00:30 +08:00
ChiaNing fa86993466 fix Stencil manager crash when pass destroy (#12241)
Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-07-28 18:27:43 +08:00
Zhang mingzhen ecd94ea596 add vbColorDirty for native color filling (#12221)
* set colorDirty as true initially.

* move it to onEnable

* add vbColorDirty to protected native code sorting

* for complete padding

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-07-27 19:28:39 +08:00
ChiaNing 310525e358 fix ui Model proxy memory leak (#12184) 2022-07-26 15:37:46 +08:00
minggo e0bfd1d380 Merge branch 'v3.6.0' into merge_v3.6 2022-07-26 12:01:26 +08:00
Santy-Wang 9c092e7b77 optimize code of batcher2D (#12166)
* optimize code of batcher2D

* fix bugs

* no lint

* no lint

* no lint

* fix ci
2022-07-25 15:56:40 +08:00
Santy-Wang 07facb9bf1 optimize memory (#12157) 2022-07-23 15:28:25 +08:00
zhakesi 442d73cc12 avoid reset float array size (#12154)
* avoid reset float array size

* release ds use safe delete

* not use float32array

* init data
2022-07-22 18:08:40 +08:00
zhakesi e18e900162 support spine/dragonbones use local native batcher2d (#12141)
* support spine/dragonbones use local native batcher2d

* avoid tiled map use local

* render-entity add set use local

* modify some code

Co-authored-by: zhakesi <zhakesi@foxmail.com>
2022-07-22 12:54:15 +08:00
Santy-Wang 2ae2d94b93 optimize performance (#12080)
* optimize performance

* fix binding

* fix bugs

* fix bugs

* fix crash

* remove useless func

* fix ci

* fix ci

* fix ci
2022-07-21 11:50:43 +08:00
ChiaNing d9c93a57c7 remove blend state on fillPass function (#12068)
Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-07-19 17:18:38 +08:00
Zhang mingzhen 12625f09d8 RenderDrawInfo code sorting (#12055)
* remove blendHash and DrawInfoAttrLayout

* remove code in cpp

* remove blend hash in ts

* remove blendhash of middleware in ts

* remove rebundant code

* remove stencilStage in drawinfo

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-07-19 13:35:54 +08:00
ChiaNing b6e1fe4d6a Slim Render Draw Info (#12053)
* Slim Render Draw Info

* fix CI

* safe delete

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-07-19 11:13:37 +08:00
zhakesi 51d999e0e6 native batcher2d tiled-map addUserNode complete (#12059) 2022-07-19 10:53:42 +08:00
James Chen ab733d5644 [v3.6.0] Fix some potential memory issues (#12045)
* Fix deleting IntrusivePtr _pipeline object in Rot.cpp.

* Remove unused code.

* Avoid nullptr dereference in SceneCulling.cpp

* Fix memory leaks for some objective-c code.

* [dragonbones] Avoid extra memory allocation and copy in CCFactory.cpp

* [dragonbones] DragonBonesData::binary needed to be 'freed' rather than 'delete'd.

* [dragonbones] Fix using delete to release memory allocated by 'new[]' in SlotColorTimelineState.

* Remove variable srcOffset & dstOffset in Mesh::merge
2022-07-18 16:39:26 +08:00
Zhang mingzhen 1fd70ef5e7 UIOpacity and UIRenderer recursion bug (#12015)
* optimize JSB sync in every frame

* opacity bug, enabled doesn't sync to native

* UIOpacity and UIRenderer recursion

* avoid parameters are undefined

* resolve circular dependency

* exclude UIMeshRenderer in setEntityColorDirtyRecursively

* exclude UIMeshRenderer in UIOpacity setEntityLocalOpacityDirtyRecursively

* blend hash should put into passdirty

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-07-18 15:42:02 +08:00
Santy-Wang 56c26db7f5 optimize renderEntity and renderDrawInfo padding (#12042)
* adjust padding

* optimize padding

* use default constructor
2022-07-18 11:48:04 +08:00
江战 ec0a051840 V3.6.0 opt fill vertex buffers (#12046)
* optimize fillVertexBuffers
2022-07-18 11:33:39 +08:00
minggo d40b8739bc Merge branch 'v3.6.0' into develop_merge_v3.6 2022-07-18 10:38:14 +08:00
Santy-Wang 996f137724 fix gfx buffer memory usage (#12037) 2022-07-16 17:08:19 +08:00
ChiaNing 6b64c7e8da Remove custom Material flag (#12021)
* Remove custom Material flag

* remove commit model material

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-07-16 09:36:32 +08:00
James Chen f644e78e5c [v3.6.0] Refactor native Batcher2d lifecycle (#12011) 2022-07-15 14:17:33 +08:00
Santy-Wang 945e715a9c restructure life cycle (#11971)
* restructure life cycle

* fix bugs

* optimize

* remove some code

* refine

* fix dragonbone custom material

* fix particle crash

* changed to CCAssert

Co-authored-by: liqiao <liqiao@cocos.com>
2022-07-14 16:33:30 +08:00
ChiaNing b395f4d5dc fix 2d particle native render bug (#11973)
Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-07-13 18:35:13 +08:00
Zhang mingzhen 05bde85ed7 V3.6.0 batcher2d code sorting (#11943)
* parentOpacity move to RenderEntity

(cherry picked from commit f1d9b5cb55c1912bd61ba490ec46ce7108097556)

* parentOpacity remove from entity and put into funtion parameters

* unify dynamic and static handle process

* reform entity shared buffer structure

* modify default value of struct

* set drawinfo type for spine/dragonbones

* remove legacy method

* reform color .type as uint8 from float

* CI fix

* remove static-cast

* CI fix

* CI fix

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
Co-authored-by: liqiao <liqiao@cocos.com>
2022-07-13 15:48:31 +08:00
James Chen 9f615e1fec fixed #11911: [v3.6][optimization] Use External ArrayBuffer to optimize the shared memory in Node (#11926) 2022-07-13 13:50:53 +08:00
ChiaNing d13ebb2fdb Mask image-stencil change (#11932)
* Mask image-stencil change

* CI fix

* size change

* event change

* event change

* event

* mask type change to native

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-07-12 13:36:50 +08:00