Commit Graph

27 Commits

Author SHA1 Message Date
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
minggo 1f1aefe8fa sync the same logic as ts (#13805) 2022-12-13 17:45:08 +08:00
江战 046a2b1378 Re-impl CC_ASSERT & CC_ASSERTF (#13588) 2022-12-05 17:12:30 +08:00
minggo 0c1786415f check mesh data (#13646) 2022-12-05 14:24:53 +08:00
李吉林 13d49b1a9b fix mesh merge error (#13639)
* fix mesh merge error

* add log.h for android

* fix DebugRenderer update on metal
2022-12-05 10:18:22 +08:00
James Chen 8877c3dec9 Fix wrong result on HarmonyOS devices if CC_OPTIMIZE_MESH_DATA is enabled (#12641) 2022-09-01 15:48:50 +08:00
James Chen 7b65436e02 fixed #12625: The prototype chain for mesh.maxPosition is not Vec3 on version 3.6.0 (#12628) 2022-09-01 15:48:25 +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
James Chen b38ae95477 Fix AddressSanitizer: memcpy-param-overlap: memory ranges in Mesh.cpp if CC_OPTIMIZE_MESH_DATA is enabled. (#11976) 2022-07-14 11:46:48 +08:00
James Chen 9fdfb687e2 Mesh supports half float format and the data can be deleted
1. Add support for converting float to half from some vertex attributes at runtime; 
2. Add Mesh.allowDataAccess property for releasing data after it is uploaded to GPU
2022-07-04 16:59:51 +08:00
李吉林 63a2b570af add readAttributeFormat (#11586) 2022-06-18 09:55:00 +08:00
James Chen 706c11f65c Fix the logic of fallback to 16 bits index buffer in Mesh.cpp, also fix memory leak if vertex count is less than 65536 on the platform which doesn't support ELEMENT_INDEX_UINT. (#11477)
* Fix the logic of fallback to 16 bits index buffer in Mesh.cpp, also fix memory leak if vertex count is less than 65536 on the platform which doesn't support ELEMENT_INDEX_UINT.

* Update Mesh.cpp
2022-06-14 13:35:18 +08:00
James Chen 8f8924c3f4 fixed #10929: Hash computation in native engine causes loss of precision, use 32 bits hash for all platforms (#11179)
* fixed #10929: Hash computation in native engine causes loss of precision. Force use 32 bits hash for all platforms.

* More uint64_t -> ccstd:hash_t

* Some uint64_t -> uint32_t in SkeletalAnimationUtils.h/.cpp

* operator() return ccstd::hash_t now and add some comments.

* size_t -> ccstd::hash_t in StringPool.h, Font.h/.cpp
2022-05-25 13:54:57 +08:00
James Chen 024737aebc fixed #11195: Rename cc::optional, cc::any, cc::variant to ccstd::optional, ccstd::any, ccstd::variant (#11197)
* Move Any.h/Optional.h/Variant.h to base/std and rename them to lowercase.

* fixed #11195: Rename cc::optional, cc::any, cc::variant to ccstd::optional, ccstd::any, ccstd::variant

* Format code.
2022-05-24 18:47:16 +08:00
James Chen 48f7c674cc boost_hash_range return size_t which is 64bit on 64bit devices, so need to cast it to uint64_t. (#11137) 2022-05-18 17:22:46 +08:00
minggo 271cc5cf23 Remove some format rule (#10919)
* remove some rules
* format all codes with new format rule
2022-05-04 13:09:24 +08:00
minggo 444bfe31c4 Refactor CC_NEW/CC_DELETE (#10810)
* replace CC_NEW/CC_DELETE with ccnew/delete
2022-04-21 16:39:34 +08:00
minggo cd48cf7106 Replace CCASSERT with CC_ASSERT (#10682)
* replace CCASSERT with CC_ASSEERT
2022-04-10 16:03:46 +08:00
李吉林 baf95125fc profiler with surface transform (#10515)
* profiler with surface transform

* add namespace closing comment
2022-03-28 10:20:54 +08:00
minggo 7f4cb9e3b1 Remove string (#10469)
* replace std::string with ccstd::string
2022-03-24 11:53:10 +08:00
Cocos Robot 24d84664f8 [ci skip][AUTO]: Automated clang-format update: 3de15842004cba2142ec0fecd82876d8f6a28236 (#10402) (#10424)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-03-21 16:04:49 +08:00
minggo 34bf14269c unify stl (#10402)
* add ccstd::vector
* replace cc::vector with ccstd::vector 
* replace std::vector with ccstd::vector
* do not include <vector>
2022-03-21 15:55:02 +08:00
李吉林 d793157a71 add dynamic mesh (#10291)
* add dynamic mesh

* Mesh init refactor

* fix geometry renderer bug

* dynamic mesh review update

* MeshUtils refactor

* do not export createDynamicMesh
2022-03-16 16:55:49 +08:00
bofeng-song 48d8baf3ac implement logic of debug.ts (#10070)
* implement logic of debug.ts
2022-02-10 15:32:51 +08:00
bofeng-song 0952f8f838 fix todo (#4225)
* fix todo
2022-01-26 17:54:27 +08:00
James Chen f6f59892af Refactor IntrusivePtr, remove reinterpret_cast (#4221)
* Refactor IntrusivePtr, remove reinterpret_cast
2022-01-26 11:57:02 +08:00
minggo 5410a48a58 Implement more logic in native (#4131)
Co-authored-by: bofeng.song <bofeng.song@chukong-inc.com>
Co-authored-by: dumganhar <dumganhar@gmail.com>
Co-authored-by: mmyduckx <308303735@qq.com>
Co-authored-by: Patrice Jiang <397136899@qq.com>
Co-authored-by: 江战 <40414978+PatriceJiang@users.noreply.github.com>
2022-01-07 18:39:40 +08:00