Commit Graph

278 Commits

Author SHA1 Message Date
halx99 c1718fee9b Fix linux crash 2024-03-10 01:24:32 +08:00
Deal 729718134f
Improve logging color style (#1739)
* Improve logging color style

* Improve code style

* Fix ci

* Fix ci

* Fix ci

* Fixup

* Fix ci
2024-03-09 09:23:39 +08:00
halx99 1297642416 Fix #1737 2024-03-08 20:42:05 +08:00
halx99 0972191e89 Reset console text color on non-win32 platforms 2024-03-08 01:55:10 +08:00
Deal 931ca91c71
Logging colorful support (#1735)
* Add logging colorful support

* Enable full log fmt style in cpp-tests
2024-03-08 01:15:26 +08:00
Deal 5d2c42e73f
Implement new axmol log system based on fmtlib (#1732)
* Implement new log macros based on fmtlib

* Fix ci

* Fix ci

* Fix android ci

* Fix warnings

* Replace more ax::log by AXLOGX

* Fix ci

* Fix linux build

* Use stack memory for log prefix

* Fix linux build

* Fix warning

* Add ILogOutput support

* Replace old log calls with new log macros

* Fixup

* Fixup

* Fixup

* Update ci msvc to 14.39

* Update Console.h [skip ci]

* Pass log level to ILogOutput
2024-03-07 08:47:00 +08:00
Deal f22cc4be68
Don't use fmt header only (#1707) 2024-02-20 05:37:28 +08:00
Deal 9774d4751c
Fix memory leaks refreshed (#1638)
* Fix memory leaks when axmol apps exit on non-embed systems

    1. DriverBase no destroyInstance
    2. Every object inherited from ax::Ref shoud destory before ScriptEngineManager, otherwise will trigger it's reinit and leak
    3.  QuadCommand always leak isolated indices
    4. static singleton should'nt inhert from ax::Ref due to destory it before ScriptEngineManager impossible
    5. Make Director don't inherit from ax::Ref due to it also cause ScriptEngineManager re-init, because we destroy ScriptEngineManger in destructor of Director
    6. Explicit Director managed by Application and don't delete self at purgeDirector, since it will release at mainLoop and re-init in glView->pollEvents then leak
    7. Rename ApplicationProtocol to ApplicationBase
    8. Rename purgeDirector since we don't delete director self at it, maye rename to cleanup
    9. Change ShaderCache to new/delete singleton, managed by ProgramManager

---------

Co-authored-by: lich426 <lich426@gmail.com>
2024-01-29 22:30:14 +08:00
halx99 c06bed508b Rename cocos_android_app_init to axmol_android_app_init and othre code cleanup 2024-01-29 08:51:35 +08:00
Deal 01d4ad60c7
Fix #1630 2024-01-24 22:00:01 +08:00
BinTester 3cf419a35c
add some utils functions and lua support (#1629)
* UIButton bugfix

* add utils lua support

* add utils lua support
2024-01-24 21:42:39 +08:00
halx99 4600c961cd Update astcenc to 4.7.0 2024-01-15 23:44:36 +08:00
smilediver 5bcaa9ce51
Fix AXASSERT() not working with more complex msg arguments (#1609) 2024-01-12 21:17:40 +08:00
halx99 dea9eb672a Improve code style
Use std::string_view instead std::string
2024-01-10 09:16:56 +08:00
arman hossiny 214fdface8
Add multi UserDefault support (#1592)
* fixed bug replace scene

* add multi UserDefalut (set file name UserDefalut)

help to run multi player on local
2024-01-10 07:34:54 +08:00
aismann 70fa8872de
Add extension 'DrawNodeEx' aka 'DrawNode v2' (#1568) 2024-01-05 02:07:13 +08:00
arman hossiny 29504d102c
Fixed bug replace scene (#1543) 2023-12-26 06:05:42 +08:00
Deal 213f788f75
Merge backend Device, DeviceInfo to DriverBase (#1499)
* backend::Device ==> backend::DriverBase
* backend::DeviceInfo ==> backend::DriverBase
* code style: remove unnecessary virtual function marks
2023-12-11 21:59:25 +08:00
halx99 affcf05b69 Prepare 2.1.0 release
* Update copyright notice
* Remove prebuilt libs from SCM
* Remove optional thirdparty sources/repo from SCM
* Remove tests resources  folder 'Content' from SCM
2023-12-08 01:04:43 +08:00
RH 371ee89f8a Reduce memory usage when using getFileMD5Hash function (#1472)
* Avoid high memory usage when hashing a file.

* Make the chunk size adjustable when hashing a file. Default to 16KB.

* Add computeFileDigest to enable the use of different hashing algorithms.

* A hash should still be reported for an empty file.
2023-12-04 19:08:18 +08:00
Paulo Coutinho 0aab228acc Rename glview to correct representative name (#1467) 2023-12-01 09:04:51 +08:00
halx99 7b33b4edf0 Apple: remove deprecated gamepad
refer #1453
2023-11-27 00:01:14 +08:00
halx99 6a0f021ba9 Update thirdparty
simdjson 3.3.0 ==> 3.6.0
astcenc 4.5.0 ==> 4.6.0
yasio 4.1.0 ==> 4.1.1
2023-11-23 23:27:27 +08:00
RH 6f00aed73f [Android] Enable support for restarting application process if OpenGL context is lost (#1409)
* Add code to allow app to restart cleanly.
Call native renderer before the sleep in onDrawFrame due to possibility of invalid texture data after delay.
Dispatch event if application process will be restarted.
Add AX_ENABLE_RESTART_APPLICATION_ON_CONTEXT_LOST configuration option. Disabled if AX_ENABLE_CACHE_TEXTURE_DATA is enabled.

* Add missing code for nativeOnContextLost

* Revert onDrawFrame change to commit in separate PR

* Fix activity reference
2023-11-02 19:41:41 +08:00
RH e808fb9758 [Android] Fix corrupted FPS stats font textures on OpenGL context lost (#1402)
* Fix corrupted FPS stats font textures on OpenGL context lost

* Ensure _rendererRecreatedListener is recreated on a director restart.
2023-10-25 09:44:08 +08:00
halx99 429f11fd1c Fix #1391 2023-10-17 23:23:57 +08:00
halx99 4ccac3c21c Fix #1389 2023-10-16 20:24:38 +08:00
halx99 de286831de Improve code style 2023-10-12 22:10:11 +08:00
Deal c2847f892e Use std containers instead uthash (#1379) 2023-10-12 22:00:46 +08:00
halx99 b9042aeb20 Add a dedicated class for easy load padded string for simdjson parser 2023-10-12 00:02:48 +08:00
halx99 65e253b54a Fix wasm build 2023-10-10 22:01:09 +08:00
Deal 58221bbf2a Fix osx ci 2023-10-08 08:03:47 +08:00
halx99 dbb0dbcb79 Use JsonWriter for SDFGen 2023-10-08 02:28:08 +08:00
halx99 2305bfeced Update yasio to latest 2023-10-06 01:02:01 +08:00
halx99 539f37651b Make Data::fastSet behavior compatible, refer #1369 2023-10-02 21:08:51 +08:00
halx99 57492b203c Update yasio, improve pod_vector
a. now the pod_vector more reusable, byte_buffer, array_buffer aka dynamic_array
b. change pod_vector resize, assign allocate memory exactly/fit and +=, append, insert operations trigger msvc capacity growth strategy
2023-10-01 22:04:47 +08:00
halx99 79cd628235 Improve API utils::base64Encode with std::span 2023-09-29 17:13:10 +08:00
halx99 8ea11838a3 Minor improvements 2023-09-29 11:30:33 +08:00
halx99 4735e7acbe Minor improvements 2023-09-29 11:27:01 +08:00
halx99 4065b90039 Preferred use byte_buffer as APIs 2023-09-29 01:57:41 +08:00
halx99 2f1efe5a51 Add preload ttf SDF font atlas support
A extension SDFGen tool also available, see ImGuiTest
2023-09-26 01:33:06 +08:00
halx99 324ebeb628 Fix wasm RandomHelper always return 0 2023-09-18 19:07:15 +08:00
halx99 f8b796a7f9 Add API Director::getNextScene
Gets the top(next) scene which will going to running state.
2023-09-07 21:57:41 +08:00
halx99 c7ab6a227e Processing wasm touch events properly 2023-09-07 19:32:06 +08:00
halx99 5a528b46e5 WASM: use shorten target platform name 'wasm' instead 'emscripten'
For examples:
- win32 app build by msvc/clang and runs on windows
- wasm app build by emscripten/emcc and runs on web browsers
2023-09-05 22:17:18 +08:00
halx99 0a56810af5 Improve wasm support
- Enable thread support
- Improve emcc flags
- Enable webp support
- axmol run now support wasm by emrun
- Rebuild openssl by pthread support
- Extension: effekseer support
2023-09-05 21:10:25 +08:00
halx99 c66ac9dedc Merge: 41714a04fd 2631c8405b
Merge branch '1.x' into dev
2023-09-02 19:56:50 +08:00
halx99 b21fcb0272 Fix gendocs.ps1 2023-09-02 19:56:33 +08:00
halx99 8f8418c15d Merge: c8bfa8cdf1 062b510c38
Merge 1.x WASM support into 'dev'
2023-09-02 19:47:18 +08:00
nowasm 03f007fdbe Add webgl aka wasm build support (#1315) 2023-09-01 16:31:14 +08:00