From 4d9a0f87e88f0b8aaa81deb49975843d94d4e55a Mon Sep 17 00:00:00 2001 From: lujun <495904500@qq.com> Date: Sat, 11 Feb 2023 22:09:50 +0800 Subject: [PATCH] =?UTF-8?q?3.6.3=20native=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3.6.3/native/engine/android/CMakeLists.txt | 15 + .../native/engine/android/Post-service.cmake | 1 + 3.6.3/native/engine/android/Pre-service.cmake | 1 + .../engine/android/app/AndroidManifest.xml | 43 + 3.6.3/native/engine/android/app/build.gradle | 104 + .../engine/android/app/proguard-rules.pro | 42 + .../app/src/com/cocos/game/AppActivity.java | 125 + 3.6.3/native/engine/android/build-cfg.json | 8 + 3.6.3/native/engine/android/build.gradle | 31 + .../android/instantapp/AndroidManifest.xml | 53 + .../engine/android/instantapp/build.gradle | 101 + .../android/instantapp/proguard-rules.pro | 42 + .../src/com/cocos/game/InstantActivity.java | 125 + .../android/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 6780 bytes .../android/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 3964 bytes .../android/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 9915 bytes .../android/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 16236 bytes .../res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 23478 bytes .../engine/android/res/values/strings.xml | 3 + 3.6.3/native/engine/common/CMakeLists.txt | 54 + 3.6.3/native/engine/common/Classes/Game.cpp | 65 + 3.6.3/native/engine/common/Classes/Game.h | 44 + 3.6.3/native/engine/common/cocos-version.json | 1 + 3.6.3/native/engine/common/localCfg.cmake | 3 + .../CMakeLists.txt | 36 + .../backup/CMakeLists.txt | 3189 +++++++++++++++++ .../native/cocos/2d/renderer/Batcher2d.cpp | 660 ++++ .../native/cocos/2d/renderer/Batcher2d.h | 208 ++ .../native/cocos/2d/renderer/RenderEntity.cpp | 116 + .../native/cocos/2d/renderer/RenderEntity.h | 164 + .../native/cocos/core/scene-graph/Node.cpp | 984 +++++ .../native/cocos/core/scene-graph/Node.h | 861 +++++ .../lcc-ui-sorting-group-native/readme.txt | 7 + 33 files changed, 7086 insertions(+) create mode 100644 3.6.3/native/engine/android/CMakeLists.txt create mode 100644 3.6.3/native/engine/android/Post-service.cmake create mode 100644 3.6.3/native/engine/android/Pre-service.cmake create mode 100644 3.6.3/native/engine/android/app/AndroidManifest.xml create mode 100644 3.6.3/native/engine/android/app/build.gradle create mode 100644 3.6.3/native/engine/android/app/proguard-rules.pro create mode 100644 3.6.3/native/engine/android/app/src/com/cocos/game/AppActivity.java create mode 100644 3.6.3/native/engine/android/build-cfg.json create mode 100644 3.6.3/native/engine/android/build.gradle create mode 100644 3.6.3/native/engine/android/instantapp/AndroidManifest.xml create mode 100644 3.6.3/native/engine/android/instantapp/build.gradle create mode 100644 3.6.3/native/engine/android/instantapp/proguard-rules.pro create mode 100644 3.6.3/native/engine/android/instantapp/src/com/cocos/game/InstantActivity.java create mode 100644 3.6.3/native/engine/android/res/mipmap-hdpi/ic_launcher.png create mode 100644 3.6.3/native/engine/android/res/mipmap-mdpi/ic_launcher.png create mode 100644 3.6.3/native/engine/android/res/mipmap-xhdpi/ic_launcher.png create mode 100644 3.6.3/native/engine/android/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 3.6.3/native/engine/android/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 3.6.3/native/engine/android/res/values/strings.xml create mode 100644 3.6.3/native/engine/common/CMakeLists.txt create mode 100644 3.6.3/native/engine/common/Classes/Game.cpp create mode 100644 3.6.3/native/engine/common/Classes/Game.h create mode 100644 3.6.3/native/engine/common/cocos-version.json create mode 100644 3.6.3/native/engine/common/localCfg.cmake create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/CMakeLists.txt create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/backup/CMakeLists.txt create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.cpp create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.h create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.cpp create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.h create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.cpp create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.h create mode 100644 3.6.3/native/engine/lcc-ui-sorting-group-native/readme.txt diff --git a/3.6.3/native/engine/android/CMakeLists.txt b/3.6.3/native/engine/android/CMakeLists.txt new file mode 100644 index 0000000..1a1bec4 --- /dev/null +++ b/3.6.3/native/engine/android/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.8) + +option(APP_NAME "Project Name" "ui-sorting-group") +project(${APP_NAME} CXX) +set(CC_LIB_NAME cocos) +set(CC_PROJECT_DIR ${CMAKE_CURRENT_LIST_DIR}) +set(CC_PROJ_SOURCES) +set(CC_COMMON_SOURCES) +set(CC_ALL_SOURCES) + +include(${CMAKE_CURRENT_LIST_DIR}/../common/CMakeLists.txt) + +cc_android_before_target(${CC_LIB_NAME}) +add_library(${CC_LIB_NAME} SHARED ${CC_ALL_SOURCES}) +cc_android_after_target(${CC_LIB_NAME}) diff --git a/3.6.3/native/engine/android/Post-service.cmake b/3.6.3/native/engine/android/Post-service.cmake new file mode 100644 index 0000000..16fd033 --- /dev/null +++ b/3.6.3/native/engine/android/Post-service.cmake @@ -0,0 +1 @@ +# Supported for Cocos Service! \ No newline at end of file diff --git a/3.6.3/native/engine/android/Pre-service.cmake b/3.6.3/native/engine/android/Pre-service.cmake new file mode 100644 index 0000000..16fd033 --- /dev/null +++ b/3.6.3/native/engine/android/Pre-service.cmake @@ -0,0 +1 @@ +# Supported for Cocos Service! \ No newline at end of file diff --git a/3.6.3/native/engine/android/app/AndroidManifest.xml b/3.6.3/native/engine/android/app/AndroidManifest.xml new file mode 100644 index 0000000..7e12819 --- /dev/null +++ b/3.6.3/native/engine/android/app/AndroidManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3.6.3/native/engine/android/app/build.gradle b/3.6.3/native/engine/android/app/build.gradle new file mode 100644 index 0000000..540d6b6 --- /dev/null +++ b/3.6.3/native/engine/android/app/build.gradle @@ -0,0 +1,104 @@ +import org.apache.tools.ant.taskdefs.condition.Os + +apply plugin: 'com.android.application' + +RES_PATH = RES_PATH.replace("\\", "/") +COCOS_ENGINE_PATH = COCOS_ENGINE_PATH.replace("\\", "/") + +buildDir = "${RES_PATH}/proj/build/$project.name" +android { + compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger() + buildToolsVersion PROP_BUILD_TOOLS_VERSION + ndkPath PROP_NDK_PATH + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + defaultConfig { + applicationId APPLICATION_ID + minSdkVersion PROP_MIN_SDK_VERSION + targetSdkVersion PROP_TARGET_SDK_VERSION + versionCode 1 + versionName "1.0" + + externalNativeBuild { + cmake { + targets "cocos" + arguments "-DRES_DIR=${RES_PATH}", "-DCOCOS_X_PATH=${COCOS_ENGINE_PATH}", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_LD=gold" + } + ndk { abiFilters PROP_APP_ABI.split(':') } + } + } + + sourceSets.main { + java.srcDirs "../src", "src" + res.srcDirs "../res", 'res' + jniLibs.srcDirs "../libs", 'libs' + manifest.srcFile "AndroidManifest.xml" + assets.srcDir "${RES_PATH}/data" + jniLibs { + // Vulkan validation layer + // srcDir "${android.ndkDirectory}/sources/third_party/vulkan/src/build-android/jniLibs" + } + } + + externalNativeBuild { + cmake { + path "../CMakeLists.txt" + buildStagingDirectory "${RES_PATH}/proj/build" + } + } + + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE") && !RELEASE_STORE_FILE.isEmpty()) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + + buildTypes { + release { + debuggable false + jniDebuggable false + renderscriptDebuggable false + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } + + externalNativeBuild { + cmake { + // switch HIDE_SYMBOLS to OFF to skip compilation flag `-fvisibility=hidden` + arguments "-DHIDE_SYMBOLS=ON" + } + } + + // resValue "string", "app_name", PROP_APP_NAME + } + + debug { + debuggable true + jniDebuggable true + renderscriptDebuggable true + // resValue "string", "app_name", "${PROP_APP_NAME}-dbg" + // applicationIdSuffix ".debug" + } + } +} + +dependencies { + implementation fileTree(dir: '../libs', include: ['*.jar','*.aar']) + implementation fileTree(dir: 'libs', include: ['*.jar','*.aar']) + implementation fileTree(dir: "${COCOS_ENGINE_PATH}/cocos/platform/android/java/libs", include: ['*.jar']) + implementation project(':libservice') + implementation project(':libcocos') +} diff --git a/3.6.3/native/engine/android/app/proguard-rules.pro b/3.6.3/native/engine/android/app/proguard-rules.pro new file mode 100644 index 0000000..dbb43fb --- /dev/null +++ b/3.6.3/native/engine/android/app/proguard-rules.pro @@ -0,0 +1,42 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in E:\developSoftware\Android\SDK/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Proguard Cocos2d-x-lite for release +-keep public class com.cocos.** { *; } +-dontwarn com.cocos.** + +# Proguard Apache HTTP for release +-keep class org.apache.http.** { *; } +-dontwarn org.apache.http.** + +# Proguard okhttp for release +-keep class okhttp3.** { *; } +-dontwarn okhttp3.** + +-keep class okio.** { *; } +-dontwarn okio.** + +# Proguard Android Webivew for release. you can comment if you are not using a webview +-keep public class android.net.http.SslError +-keep public class android.webkit.WebViewClient + +-keep public class com.google.** { *; } + +-dontwarn android.webkit.WebView +-dontwarn android.net.http.SslError +-dontwarn android.webkit.WebViewClient diff --git a/3.6.3/native/engine/android/app/src/com/cocos/game/AppActivity.java b/3.6.3/native/engine/android/app/src/com/cocos/game/AppActivity.java new file mode 100644 index 0000000..5aaece8 --- /dev/null +++ b/3.6.3/native/engine/android/app/src/com/cocos/game/AppActivity.java @@ -0,0 +1,125 @@ +/**************************************************************************** +Copyright (c) 2015-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package com.cocos.game; + +import android.os.Bundle; +import android.content.Intent; +import android.content.res.Configuration; + +import com.cocos.service.SDKWrapper; +import com.cocos.lib.CocosActivity; + +public class AppActivity extends CocosActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + // DO OTHER INITIALIZATION BELOW + SDKWrapper.shared().init(this); + + } + + @Override + protected void onResume() { + super.onResume(); + SDKWrapper.shared().onResume(); + } + + @Override + protected void onPause() { + super.onPause(); + SDKWrapper.shared().onPause(); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + // Workaround in https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508 + if (!isTaskRoot()) { + return; + } + SDKWrapper.shared().onDestroy(); + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + SDKWrapper.shared().onActivityResult(requestCode, resultCode, data); + } + + @Override + protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); + SDKWrapper.shared().onNewIntent(intent); + } + + @Override + protected void onRestart() { + super.onRestart(); + SDKWrapper.shared().onRestart(); + } + + @Override + protected void onStop() { + super.onStop(); + SDKWrapper.shared().onStop(); + } + + @Override + public void onBackPressed() { + SDKWrapper.shared().onBackPressed(); + super.onBackPressed(); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + SDKWrapper.shared().onConfigurationChanged(newConfig); + super.onConfigurationChanged(newConfig); + } + + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + SDKWrapper.shared().onRestoreInstanceState(savedInstanceState); + super.onRestoreInstanceState(savedInstanceState); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + SDKWrapper.shared().onSaveInstanceState(outState); + super.onSaveInstanceState(outState); + } + + @Override + protected void onStart() { + SDKWrapper.shared().onStart(); + super.onStart(); + } + + @Override + public void onLowMemory() { + SDKWrapper.shared().onLowMemory(); + super.onLowMemory(); + } +} diff --git a/3.6.3/native/engine/android/build-cfg.json b/3.6.3/native/engine/android/build-cfg.json new file mode 100644 index 0000000..fb658e2 --- /dev/null +++ b/3.6.3/native/engine/android/build-cfg.json @@ -0,0 +1,8 @@ +{ + "ndk_module_path" :[ + "${COCOS_ROOT}", + "${COCOS_ROOT}/cocos", + "${COCOS_ROOT}/external" + ], + "copy_resources": [] +} diff --git a/3.6.3/native/engine/android/build.gradle b/3.6.3/native/engine/android/build.gradle new file mode 100644 index 0000000..2ae589d --- /dev/null +++ b/3.6.3/native/engine/android/build.gradle @@ -0,0 +1,31 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + + repositories { + google() + mavenCentral() + // jcenter() // keeped as anchor, will be removed soon + } + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + mavenCentral() + // jcenter() // keeped as anchor, will be removed soon + flatDir { + dirs 'libs' + } + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/3.6.3/native/engine/android/instantapp/AndroidManifest.xml b/3.6.3/native/engine/android/instantapp/AndroidManifest.xml new file mode 100644 index 0000000..2bf48de --- /dev/null +++ b/3.6.3/native/engine/android/instantapp/AndroidManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3.6.3/native/engine/android/instantapp/build.gradle b/3.6.3/native/engine/android/instantapp/build.gradle new file mode 100644 index 0000000..cac6ddc --- /dev/null +++ b/3.6.3/native/engine/android/instantapp/build.gradle @@ -0,0 +1,101 @@ +import org.apache.tools.ant.taskdefs.condition.Os + +apply plugin: 'com.android.application' + +RES_PATH = RES_PATH.replace("\\", "/") +COCOS_ENGINE_PATH = COCOS_ENGINE_PATH.replace("\\", "/") +buildDir = "${RES_PATH}/proj/build/$project.name" + +android { + compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger() + buildToolsVersion PROP_BUILD_TOOLS_VERSION + ndkPath PROP_NDK_PATH + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + defaultConfig { + applicationId "com.lcc.test" + minSdkVersion PROP_MIN_SDK_VERSION + targetSdkVersion PROP_TARGET_SDK_VERSION + versionCode 1 + versionName "1.0" + + externalNativeBuild { + cmake { + targets "cocos" + arguments "-DRES_DIR=${RES_PATH}", "-DCOCOS_X_PATH=${COCOS_ENGINE_PATH}","-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_LD=gold" + cppFlags "-frtti -fexceptions -fsigned-char -DANDROID_INSTANT=1" + } + ndk { abiFilters PROP_APP_ABI.split(':') } + } + } + + sourceSets.main { + java.srcDirs "../src", "src" + res.srcDirs "../res", 'res' + jniLibs.srcDirs "../libs", 'libs' + manifest.srcFile "AndroidManifest.xml" + assets.srcDir "${RES_PATH}/data" + } + + externalNativeBuild { + cmake { + path "../CMakeLists.txt" + buildStagingDirectory "${RES_PATH}/proj/build" + } + } + + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE") && !RELEASE_STORE_FILE.isEmpty()) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + + buildTypes { + release { + debuggable false + jniDebuggable false + renderscriptDebuggable false + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } + + externalNativeBuild { + cmake { + // switch HIDE_SYMBOLS to OFF to skip compilation flag `-fvisibility=hidden` + arguments "-DHIDE_SYMBOLS=ON" + } + } + + // resValue "string", "app_name", PROP_APP_NAME + } + + debug { + debuggable true + jniDebuggable true + renderscriptDebuggable true + // resValue "string", "app_name", "${PROP_APP_NAME}-dbg" + // applicationIdSuffix ".debug" + } + } +} + +dependencies { + implementation fileTree(dir: '../libs', include: ['*.jar','*.aar']) + implementation fileTree(dir: 'libs', include: ['*.jar','*.aar']) + implementation fileTree(dir: "${COCOS_ENGINE_PATH}/cocos/platform/android/java/libs", include: ['*.jar']) + implementation project(':libservice') + implementation project(':libcocos') +} diff --git a/3.6.3/native/engine/android/instantapp/proguard-rules.pro b/3.6.3/native/engine/android/instantapp/proguard-rules.pro new file mode 100644 index 0000000..dbb43fb --- /dev/null +++ b/3.6.3/native/engine/android/instantapp/proguard-rules.pro @@ -0,0 +1,42 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in E:\developSoftware\Android\SDK/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Proguard Cocos2d-x-lite for release +-keep public class com.cocos.** { *; } +-dontwarn com.cocos.** + +# Proguard Apache HTTP for release +-keep class org.apache.http.** { *; } +-dontwarn org.apache.http.** + +# Proguard okhttp for release +-keep class okhttp3.** { *; } +-dontwarn okhttp3.** + +-keep class okio.** { *; } +-dontwarn okio.** + +# Proguard Android Webivew for release. you can comment if you are not using a webview +-keep public class android.net.http.SslError +-keep public class android.webkit.WebViewClient + +-keep public class com.google.** { *; } + +-dontwarn android.webkit.WebView +-dontwarn android.net.http.SslError +-dontwarn android.webkit.WebViewClient diff --git a/3.6.3/native/engine/android/instantapp/src/com/cocos/game/InstantActivity.java b/3.6.3/native/engine/android/instantapp/src/com/cocos/game/InstantActivity.java new file mode 100644 index 0000000..318e839 --- /dev/null +++ b/3.6.3/native/engine/android/instantapp/src/com/cocos/game/InstantActivity.java @@ -0,0 +1,125 @@ +/**************************************************************************** +Copyright (c) 2015-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package com.cocos.game; + +import android.os.Bundle; +import android.content.Intent; +import android.content.res.Configuration; + +import com.cocos.service.SDKWrapper; +import com.cocos.lib.CocosActivity; + +public class InstantActivity extends CocosActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + // DO OTHER INITIALIZATION BELOW + SDKWrapper.shared().init(this); + + } + + @Override + protected void onResume() { + super.onResume(); + SDKWrapper.shared().onResume(); + } + + @Override + protected void onPause() { + super.onPause(); + SDKWrapper.shared().onPause(); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + // Workaround in https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508 + if (!isTaskRoot()) { + return; + } + SDKWrapper.shared().onDestroy(); + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + SDKWrapper.shared().onActivityResult(requestCode, resultCode, data); + } + + @Override + protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); + SDKWrapper.shared().onNewIntent(intent); + } + + @Override + protected void onRestart() { + super.onRestart(); + SDKWrapper.shared().onRestart(); + } + + @Override + protected void onStop() { + super.onStop(); + SDKWrapper.shared().onStop(); + } + + @Override + public void onBackPressed() { + SDKWrapper.shared().onBackPressed(); + super.onBackPressed(); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + SDKWrapper.shared().onConfigurationChanged(newConfig); + super.onConfigurationChanged(newConfig); + } + + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + SDKWrapper.shared().onRestoreInstanceState(savedInstanceState); + super.onRestoreInstanceState(savedInstanceState); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + SDKWrapper.shared().onSaveInstanceState(outState); + super.onSaveInstanceState(outState); + } + + @Override + protected void onStart() { + SDKWrapper.shared().onStart(); + super.onStart(); + } + + @Override + public void onLowMemory() { + SDKWrapper.shared().onLowMemory(); + super.onLowMemory(); + } +} diff --git a/3.6.3/native/engine/android/res/mipmap-hdpi/ic_launcher.png b/3.6.3/native/engine/android/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..888c0d56abef8d4ca9123954777b6f820c967b6f GIT binary patch literal 6780 zcmV-?8iVDDP)Py4Hc3Q5RCr#!TnUsNRkhvsR=s)X?$<+l%0S4BfQW)1`G^dDaR8a*0|JtSFsKMI ziF|`Zi73Mt6af=3BtjBE8I(bTE?L4yhR;G}ln@9ZL(koB=ze2W-M`MQdhb=$8@iiB zd#%9hel^_M_ndw9Ip^MD82^U>PylGwp&oyv>676|?{ih*d=pqON z0^Q+Q+l8T~*jZk`|6sdX18@@=^3j*QE$2kVX~TVYuEIZ(Y7gHS3TZFx)J>Y z1OdmuiX(HPQXX%OTi6b-IfxHuQ7((18H5013Qa2K3baB#9`EbIA7N_vKEao#u;c@Y(Ld3rf45EzAK$=17ZIGRr5-Q5W--L zsfy}BEjlVl|D6^kgia)-s2Jc-5Zw zwp~2jv->V9YRiEX&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T*f4c>d+E{q3gLqF1J3D8e3T^<({*SE6>$rQ(LbF*w+z~F0_F@vl|*>C(5D7 zB3Y3SWs=lnU(nOI9q@9F+R463O2PREyTefXNXge^MTLJ+{1^8(bv>hL+TX^Dx8E@KUK* t_={OAK0Prp@rL7qyxddG(ALs|{{b2*2vZrNCnf*@002ovPDHLkV1lTm%^Uy# literal 0 HcmV?d00001 diff --git a/3.6.3/native/engine/android/res/mipmap-xxhdpi/ic_launcher.png b/3.6.3/native/engine/android/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..2f1e5a6b3776489f893d8ed4768ae9fe356b4df8 GIT binary patch literal 16236 zcmV-yKa;?TP)PyA07*naRCr$PeFvCaRr&sV%e0-@-m<%Clt3sJL{tz3r79qppg}qW=>ds~L8ORC z5fmu_q>2P-0YRk*K|ql9qlaEnwPIcJL%Ek_mjzF zm*pL0trv48zk8Wq9M>C^@C*WuqBWkr9u7A)?i!BN>>H}8`MNI{nk~vwgCOw7tEx)> zD|Grq2heoA`DSIk@Wck%)J^U{Dyv0?J`w<}|ETYBx$NLrGWkI&KJwq>@bD9{f%Pu} zNN5+(LufWt97yA9y*q*kIQd3aS2yfd-Q09|sHW~9+3%lD@2e^b6otT|s!$oos3Y`t z*oSNqz%;Ixt^k-kpUXZhxn+E|v6;vEPh|fS1qhaEK!skLyih40()83Q`)n=o8a89 zWj5P|k;=S_VSLNJvN#*%@iXpw^I55?YzzcZ6eUSw7)!y zL*s6(;i+V2nZ~JWY?)Kr)_zVf6#gtro>Ft+=B6Z)P383V11R5e4 zsW@$0o4z>$X<`HJ`o`s%H4hA^Y$g*W5s(tm=wp4|s}?1OhTb+<11=}Z{24ERbUP|E zcFbJV(AsvsARw4iayfx)mcRs?;fH?Z@#C&AT`&5dX)AN2HHkqsPLgCvg_;`d>AGnB zs!uM{h+tgWXgmO7v=e*$=Ez|a zL@~R5<;TYl^mN@>4v0#9Is;Grl=jn_r_Q`Cm(4QqEZDS;r~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I!#g5kFXd2Rf=uw`pIbq&_AE{e;7*&s=(EGsDFN8il!_FXtM)c;%l z^0JpX!+WC4OqiRz}yB6z_B{t2YlVOps)3*)l}4j_0|V*gMG1TK7itag=2 zm^F6ItSl+AM1rsNX46A=r!uKqV1zW#&!lU8D>9}U0Ok~%)`0$QjaO72A5A2VlO<&y zfts%xk?EuF&2+FH2%fyz64{pkjP7cHXClF>xsYmr#|XjO^sDoIj>0S4xYQpYLjAPv9u zUmy=HP2yBrgfK_hO`Sf57NK-|0%fN54?CR}PIxDf z0ec+O$kQ1KoT_?m=cR%yD+v$HVsK<(_<|D=_qL0Kw&iZ%II+RsnOxg z(<37z%Pl>i6-0g`_#{eONLAB8f&7|4?>5shTF+}X$6~S1Dr$6RS&i%{E9#b#EX|Z8 zDPnCb8+B(!HeUu4=7|~K`&)Z|jcc9;g_>n?O#BeQWKg#W`@&g)A&wdT%Q22wuN04$31=L;pM7m zG&%>0GGCF^EfhtbEy?msNm3dm=+(L;#mSX|D|eltbxc(mPK%8b|H2?}jHFS&nMWWz zONxm&%M+FwMJSesUI|}Q^M8k@WLOk~`*m!%bX^*eWDFKGtw$Tnuh9x)EAnH7WrfkP p_eMuEq~R%dw&+|>pX%pt`u}Yp*kK@1_WJ+;002ovPDHLkV1lyJf7Ac~ literal 0 HcmV?d00001 diff --git a/3.6.3/native/engine/android/res/values/strings.xml b/3.6.3/native/engine/android/res/values/strings.xml new file mode 100644 index 0000000..2e222d1 --- /dev/null +++ b/3.6.3/native/engine/android/res/values/strings.xml @@ -0,0 +1,3 @@ + + ui-sorting-group + diff --git a/3.6.3/native/engine/common/CMakeLists.txt b/3.6.3/native/engine/common/CMakeLists.txt new file mode 100644 index 0000000..936b69f --- /dev/null +++ b/3.6.3/native/engine/common/CMakeLists.txt @@ -0,0 +1,54 @@ +enable_language(C ASM) +set(DEVELOPMENT_TEAM "" CACHE STRING "APPLE Developtment Team") +set(RES_DIR "" CACHE STRING "Resource path") +set(COCOS_X_PATH "" CACHE STRING "Path to engine/native/") + +set(TARGET_OSX_VERSION "10.14" CACHE STRING "Target MacOSX version" FORCE) +set(TARGET_IOS_VERSION "11.0" CACHE STRING "Target iOS version" FORCE) + +set(CMAKE_CXX_STANDARD 17) +option(CC_DEBUG_FORCE "Force enable CC_DEBUG in release mode" OFF) +option(USE_SE_V8 "Use V8 JavaScript Engine" ON) +option(USE_V8_DEBUGGER "Compile v8 inspector ws server" ON) +option(USE_V8_DEBUGGER_FORCE "Force enable debugger in release mode" OFF) +option(USE_SOCKET "Enable WebSocket & SocketIO" ON) +option(USE_AUDIO "Enable Audio" ON) #Enable AudioEngine +option(USE_EDIT_BOX "Enable EditBox" ON) +option(USE_SE_JSC "Use JavaScriptCore on MacOSX/iOS" OFF) +option(USE_VIDEO "Enable VideoPlayer Component" ON) +option(USE_WEBVIEW "Enable WebView Component" ON) +option(USE_MIDDLEWARE "Enable Middleware" ON) +option(USE_DRAGONBONES "Enable Dragonbones" ON) +option(USE_SPINE "Enable Spine" ON) +option(USE_WEBSOCKET_SERVER "Enable WebSocket Server" OFF) +option(USE_JOB_SYSTEM_TASKFLOW "Use taskflow as job system backend" OFF) +option(USE_JOB_SYSTEM_TBB "Use tbb as job system backend" OFF) +option(USE_PHYSICS_PHYSX "Use PhysX Physics" ON) +option(USE_OCCLUSION_QUERY "Use Occlusion Query" ON) +option(USE_DEBUG_RENDERER "Use Debug Renderer" ON) +option(USE_GEOMETRY_RENDERER "Use Geometry Renderer" ON) +option(USE_WEBP "Use Webp" ON) + +if(NOT RES_DIR) + message(FATAL_ERROR "RES_DIR is not set!") +endif() + +include(${RES_DIR}/proj/cfg.cmake) + +if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/localCfg.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/localCfg.cmake) +endif() + +if(NOT COCOS_X_PATH) + message(FATAL_ERROR "COCOS_X_PATH is not set!") +endif() + +# 引入lcc-ui-sorting-group native部分 +include(${CMAKE_CURRENT_LIST_DIR}/../lcc-ui-sorting-group-native/CMakeLists.txt) + +include(${COCOS_X_PATH}/CMakeLists.txt) + +list(APPEND CC_COMMON_SOURCES + ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h + ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp +) diff --git a/3.6.3/native/engine/common/Classes/Game.cpp b/3.6.3/native/engine/common/Classes/Game.cpp new file mode 100644 index 0000000..c15664c --- /dev/null +++ b/3.6.3/native/engine/common/Classes/Game.cpp @@ -0,0 +1,65 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You + shall not use Cocos Creator software for developing other software or tools + that's used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to + you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#include "Game.h" + +#ifndef GAME_NAME +#define GAME_NAME "CocosGame"; +#endif + +#ifndef SCRIPT_XXTEAKEY +#define SCRIPT_XXTEAKEY ""; +#endif + +Game::Game() = default; + +int Game::init() { + _windowInfo.title = GAME_NAME; + // configurate window size + // _windowInfo.height = 600; + // _windowInfo.width = 800; + +#if CC_DEBUG + _debuggerInfo.enabled = true; +#else + _debuggerInfo.enabled = false; +#endif + _debuggerInfo.port = 6086; + _debuggerInfo.address = "0.0.0.0"; + _debuggerInfo.pauseOnStart = false; + + _xxteaKey = SCRIPT_XXTEAKEY; + + BaseGame::init(); + return 0; +} + +void Game::onPause() { BaseGame::onPause(); } + +void Game::onResume() { BaseGame::onResume(); } + +void Game::onClose() { BaseGame::onClose(); } + +CC_REGISTER_APPLICATION(Game); diff --git a/3.6.3/native/engine/common/Classes/Game.h b/3.6.3/native/engine/common/Classes/Game.h new file mode 100644 index 0000000..521615e --- /dev/null +++ b/3.6.3/native/engine/common/Classes/Game.h @@ -0,0 +1,44 @@ +/**************************************************************************** + Copyright (c) 2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You + shall not use Cocos Creator software for developing other software or tools + that's used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to + you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#pragma once + +#include "cocos/cocos.h" + +/** + @brief The cocos2d Application. + + The reason for implement as private inheritance is to hide some interface call + by Director. + */ +class Game : public cc::BaseGame { +public: + Game(); + int init() override; + // bool init() override; + void onPause() override; + void onResume() override; + void onClose() override; +}; diff --git a/3.6.3/native/engine/common/cocos-version.json b/3.6.3/native/engine/common/cocos-version.json new file mode 100644 index 0000000..6519c54 --- /dev/null +++ b/3.6.3/native/engine/common/cocos-version.json @@ -0,0 +1 @@ +{"version":"3.6.3","skipCheck":false} diff --git a/3.6.3/native/engine/common/localCfg.cmake b/3.6.3/native/engine/common/localCfg.cmake new file mode 100644 index 0000000..f17333e --- /dev/null +++ b/3.6.3/native/engine/common/localCfg.cmake @@ -0,0 +1,3 @@ +## Add or overwrite options from cfg.cmake. +## This file is ignored from git. +# set(NODE_EXECUTABLE /opt/...) \ No newline at end of file diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/CMakeLists.txt b/3.6.3/native/engine/lcc-ui-sorting-group-native/CMakeLists.txt new file mode 100644 index 0000000..f0fba3d --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/CMakeLists.txt @@ -0,0 +1,36 @@ + +if(NOT DEFINED COCOS_SOURCE_PLUGIN_EXCULDE) + set(COCOS_SOURCE_PLUGIN_EXCULDE) +endif() +if(NOT DEFINED COCOS_SOURCE_PLUGIN_LIST) + set(COCOS_SOURCE_PLUGIN_LIST) +endif() +if(NOT DEFINED COCOS_SOURCE_PLUGIN_INCLUDES) + set(COCOS_SOURCE_PLUGIN_INCLUDES) +endif() + +# 排除替换源文件 +list(APPEND COCOS_SOURCE_PLUGIN_EXCULDE + "${COCOS_X_PATH}/cocos/2d/renderer/Batcher2d.h" + "${COCOS_X_PATH}/cocos/2d/renderer/Batcher2d.cpp" + "${COCOS_X_PATH}/cocos/2d/renderer/RenderEntity.h" + "${COCOS_X_PATH}/cocos/2d/renderer/RenderEntity.cpp" + "${COCOS_X_PATH}/cocos/core/scene-graph/Node.h" + "${COCOS_X_PATH}/cocos/core/scene-graph/Node.cpp" +) + +# 添加替换源文件 +list(APPEND COCOS_SOURCE_PLUGIN_LIST + "${CMAKE_CURRENT_LIST_DIR}/native/cocos/2d/renderer/Batcher2d.h" + "${CMAKE_CURRENT_LIST_DIR}/native/cocos/2d/renderer/Batcher2d.cpp" + "${CMAKE_CURRENT_LIST_DIR}/native/cocos/2d/renderer/RenderEntity.h" + "${CMAKE_CURRENT_LIST_DIR}/native/cocos/2d/renderer/RenderEntity.cpp" + "${CMAKE_CURRENT_LIST_DIR}/native/cocos/core/scene-graph/Node.h" + "${CMAKE_CURRENT_LIST_DIR}/native/cocos/core/scene-graph/Node.cpp" +) + +# 添加替换源文件 +list(APPEND COCOS_SOURCE_PLUGIN_INCLUDES + "${CMAKE_CURRENT_LIST_DIR}/native" + "${CMAKE_CURRENT_LIST_DIR}/native/cocos" +) diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/backup/CMakeLists.txt b/3.6.3/native/engine/lcc-ui-sorting-group-native/backup/CMakeLists.txt new file mode 100644 index 0000000..4c1fab3 --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/backup/CMakeLists.txt @@ -0,0 +1,3189 @@ +include(${CMAKE_CURRENT_LIST_DIR}/cmake/predefine.cmake) + +################################# engine source code ################################## +set(CWD ${CMAKE_CURRENT_LIST_DIR}) +set(COCOS_SOURCE_LIST) +set(ENGINE_NAME cocos_engine) + +# Should be enable someday in the future +# set(CMAKE_CXX_FLAGS "${WERROR_FLAGS}") + +################################# options ############################################ +# default fallback options +cc_set_if_undefined(CC_DEBUG_FORCE OFF) +cc_set_if_undefined(USE_SE_V8 ON) +cc_set_if_undefined(USE_SE_SM OFF) +cc_set_if_undefined(USE_V8_DEBUGGER ON) +cc_set_if_undefined(USE_V8_DEBUGGER_FORCE OFF) +cc_set_if_undefined(USE_SOCKET ON) +cc_set_if_undefined(USE_AUDIO ON) +cc_set_if_undefined(USE_EDIT_BOX ON) +cc_set_if_undefined(USE_VIDEO ON) +cc_set_if_undefined(USE_WEBVIEW ON) +cc_set_if_undefined(USE_MIDDLEWARE ON) +cc_set_if_undefined(USE_DRAGONBONES ON) +cc_set_if_undefined(USE_SPINE ON) +cc_set_if_undefined(USE_WEBSOCKET_SERVER OFF) +cc_set_if_undefined(USE_JOB_SYSTEM_TASKFLOW OFF) +cc_set_if_undefined(USE_JOB_SYSTEM_TBB OFF) +cc_set_if_undefined(USE_PHYSICS_PHYSX OFF) +cc_set_if_undefined(USE_MODULES OFF) +cc_set_if_undefined(USE_XR OFF) +cc_set_if_undefined(USE_SERVER_MODE OFF) +cc_set_if_undefined(USE_PLUGINS ON) +cc_set_if_undefined(USE_OCCLUSION_QUERY ON) +cc_set_if_undefined(USE_DEBUG_RENDERER ON) +cc_set_if_undefined(USE_GEOMETRY_RENDERER ON) +cc_set_if_undefined(USE_WEBP ON) +cc_set_if_undefined(NET_MODE 0) # 0 is client +cc_set_if_undefined(USE_REMOTE_LOG OFF) + + +if(ANDROID AND NOT DEFINED USE_CCACHE) + if("$ENV{COCOS_USE_CCACHE}" STREQUAL "1") + message(STATUS "Enable ccache by env CC_USE_CACHE=1") + set(USE_CCACHE ON) + else() + set(USE_CCACHE OFF) + endif() +endif() + +if(NX) + cc_set_if_undefined(CC_USE_VULKAN ON) + cc_set_if_undefined(CC_USE_GLES3 OFF) + cc_set_if_undefined(CC_USE_GLES2 OFF) +elseif(ANDROID OR WINDOWS OR OHOS) + cc_set_if_undefined(CC_USE_GLES3 ON) + cc_set_if_undefined(CC_USE_VULKAN OFF) + cc_set_if_undefined(CC_USE_GLES2 OFF) +elseif(MACOSX OR IOS) + cc_set_if_undefined(CC_USE_METAL ON) + cc_set_if_undefined(CC_USE_VULKAN OFF) + cc_set_if_undefined(CC_USE_GLES3 OFF) + cc_set_if_undefined(CC_USE_GLES2 OFF) +endif() + +set(CC_USE_GLES3 ${CC_USE_GLES3} CACHE INTERNAL "") +set(CC_USE_GLES2 ${CC_USE_GLES2} CACHE INTERNAL "") +set(CC_USE_VULKAN ${CC_USE_VULKAN} CACHE INTERNAL "") +set(CC_USE_METAL ${CC_USE_METAL} CACHE INTERNAL "") + +if(USE_SERVER_MODE) + set(CC_USE_VULKAN OFF) + set(CC_USE_METAL OFF) + set(CC_USE_GLES3 OFF) + set(CC_USE_GLES2 OFF) + add_definitions(-DCC_SERVER_MODE) +endif() + + +add_definitions(-DCC_NETMODE_CLIENT=0) +add_definitions(-DCC_NETMODE_LISTEN_SERVER=1) +add_definitions(-DCC_NETMODE_HOST_SERVER=2) +if(${NET_MODE} EQUAL "0" OR ${NET_MODE} EQUAL "1" OR ${NET_MODE} EQUAL "2") + add_definitions(-DCC_NETMODE=${NET_MODE}) +else() + message(FATAL_ERROR "NET_MODE only support setting to 1 2 or 3.") +endif() + +if(USE_PHYSICS_PHYSX) + if (ANDROID AND CMAKE_ANDROID_ARCH_ABI MATCHES x86) + set(USE_PHYSICS_PHYSX OFF) + message(AUTHOR_WARNING "Native PhysX does not support Google Android X86") + endif() +endif() + +if(NOT USE_SOCKET) + set(USE_WEBSOCKET_SERVER OFF) +endif() + +if(OHOS) + set(CC_USE_GLES2 OFF) +endif() + +## disable videoplay on non-mobile platforms +if(NOT ANDROID AND NOT IOS AND NOT OHOS) + set(USE_VIDEO OFF) + set(USE_WEBVIEW OFF) +endif() + +## disable middleware when dragonbones and spine are disabled +if(NOT USE_DRAGONBONES AND NOT USE_SPINE) + set(USE_MIDDLEWARE OFF) +endif() + +if(USE_DRAGONBONES OR USE_SPINE) + set(USE_MIDDLEWARE ON) +endif() + +if(USE_JOB_SYSTEM_TASKFLOW AND USE_JOB_SYSTEM_TBB) + set(USE_JOB_SYSTEM_TASKFLOW ON) + set(USE_JOB_SYSTEM_TBB OFF) +endif() + +if(OHOS AND USE_JOB_SYSTEM_TBB) + message(WARNING "JobSystem tbb is not supported by HarmonyOS") + set(USE_JOB_SYSTEM_TBB OFF) +endif() + +if(USE_JOB_SYSTEM_TASKFLOW) + set(CMAKE_CXX_STANDARD 17) + if(IOS AND "${TARGET_IOS_VERSION}" VERSION_LESS "12.0") + message(FATAL_ERROR "Target iOS version requires 12.0+ when enable taskflow") + endif() +endif() + +if(ANDROID) + if(USE_CCACHE AND NOT CCACHE_EXECUTABLE) + message(AUTHOR_WARNING "ccache executable not found!") + endif() + if(CCACHE_EXECUTABLE AND USE_CCACHE) + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}") + endif() +endif() + +if(CI_FORCE_MINIMAL_FEATURES) + set(USE_V8_DEBUGGER_FORCE OFF) + set(USE_V8_DEBUGGER OFF) + set(USE_AUDIO OFF) + set(USE_EDIT_BOX OFF) + set(USE_VIDEO OFF) + set(USE_WEBVIEW OFF) + set(USE_MIDDLEWARE OFF) + set(USE_DRAGONBONES OFF) + set(USE_SPINE OFF) + set(USE_SOCKET OFF) + set(USE_WEBSOCKET_SERVER OFF) + set(USE_PHYSICS_PHYSX OFF) + set(USE_JOB_SYSTEM_TBB OFF) + set(USE_JOB_SYSTEM_TASKFLOW OFF) + set(USE_PLUGINS OFF) + set(USE_OCCLUSION_QUERY OFF) + set(USE_DEBUG_RENDERER OFF) + set(USE_GEOMETRY_RENDERER OFF) + set(USE_WEBP OFF) +endif() + +################################# external source code ################################ +set(EXTERNAL_ROOT ${CMAKE_CURRENT_LIST_DIR}/external) +set(USE_BUILTIN_EXTERNAL OFF) +if(NOT EXISTS ${EXTERNAL_ROOT}/CMakeLists.txt) + if(DEFINED BUILTIN_COCOS_X_PATH) + set(EXTERNAL_ROOT ${BUILTIN_COCOS_X_PATH}/external) + set(USE_BUILTIN_EXTERNAL ON) + message(AUTHOR_WARNING "Directory 'external' not found in '${CMAKE_CURRENT_LIST_DIR}', use builtin directory '${BUILTIN_COCOS_X_PATH}' instead!") + else() + message(FATAL_ERROR "Please download external libraries! File ${CMAKE_CURRENT_LIST_DIR}/external/CMakeLists.txt not exist!") + endif() +endif() +################################# list all option values ############################## + +cc_inspect_values( + BUILTIN_COCOS_X_PATH + USE_BUILTIN_EXTERNAL + USE_MODULES + CC_USE_METAL + CC_USE_GLES3 + CC_USE_GLES2 + CC_USE_VULKAN + CC_DEBUG_FORCE + USE_SE_V8 + USE_V8_DEBUGGER + USE_V8_DEBUGGER_FORCE + USE_SE_SM + USE_SOCKET + USE_AUDIO + USE_EDIT_BOX + USE_VIDEO + USE_WEBVIEW + USE_MIDDLEWARE + USE_DRAGONBONES + USE_SPINE + USE_WEBSOCKET_SERVER + USE_PHYSICS_PHYSX + USE_JOB_SYSTEM_TBB + USE_JOB_SYSTEM_TASKFLOW + USE_XR + USE_SERVER_MODE + USE_CCACHE + CCACHE_EXECUTABLE + NODE_EXECUTABLE + NET_MODE + USE_REMOTE_LOG +) + + +include(${EXTERNAL_ROOT}/CMakeLists.txt) + +##### audio +if(USE_AUDIO) + cocos_source_files( + cocos/audio/AudioEngine.cpp + cocos/audio/include/AudioEngine.h + cocos/audio/include/AudioDef.h + cocos/audio/include/Export.h + ) + if(WINDOWS) + cocos_source_files( + cocos/audio/common/utils/tinysndfile.cpp +NO_WERROR cocos/audio/common/utils/primitives.cpp + cocos/audio/common/utils/include/tinysndfile.h + cocos/audio/common/utils/include/primitives.h + cocos/audio/common/utils/private/private.h + cocos/audio/common/decoder/AudioDecoder.cpp + cocos/audio/common/decoder/AudioDecoder.h + cocos/audio/common/decoder/AudioDecoderManager.cpp + cocos/audio/common/decoder/AudioDecoderManager.h + cocos/audio/common/decoder/AudioDecoderMp3.cpp + cocos/audio/common/decoder/AudioDecoderMp3.h + cocos/audio/common/decoder/AudioDecoderOgg.cpp + cocos/audio/common/decoder/AudioDecoderOgg.h + cocos/audio/common/decoder/AudioDecoderWav.cpp + cocos/audio/common/decoder/AudioDecoderWav.h + cocos/audio/oalsoft/AudioCache.cpp + cocos/audio/oalsoft/AudioCache.h + cocos/audio/oalsoft/AudioEngine-soft.cpp + cocos/audio/oalsoft/AudioEngine-soft.h + cocos/audio/include/AudioMacros.h + cocos/audio/oalsoft/AudioPlayer.cpp + cocos/audio/oalsoft/AudioPlayer.h + ) + elseif(LINUX OR QNX) + cocos_source_files( + cocos/audio/common/decoder/AudioDecoder.cpp + cocos/audio/common/decoder/AudioDecoder.h + cocos/audio/common/decoder/AudioDecoderManager.cpp + cocos/audio/common/decoder/AudioDecoderManager.h + cocos/audio/common/decoder/AudioDecoderMp3.cpp + cocos/audio/common/decoder/AudioDecoderMp3.h + cocos/audio/common/decoder/AudioDecoderOgg.cpp + cocos/audio/common/decoder/AudioDecoderOgg.h + cocos/audio/oalsoft/AudioCache.cpp + cocos/audio/oalsoft/AudioCache.h + cocos/audio/oalsoft/AudioEngine-soft.cpp + cocos/audio/oalsoft/AudioEngine-soft.h + cocos/audio/include/AudioMacros.h + cocos/audio/oalsoft/AudioPlayer.cpp + cocos/audio/oalsoft/AudioPlayer.h + ) + elseif(ANDROID) + cocos_source_files( + cocos/audio/common/utils/include/primitives.h + cocos/audio/common/utils/include/format.h + cocos/audio/common/utils/include/minifloat.h + cocos/audio/common/utils/include/tinysndfile.h + cocos/audio/common/utils/private/private.h + cocos/audio/common/utils/minifloat.cpp + cocos/audio/common/utils/primitives.cpp + cocos/audio/common/utils/tinysndfile.cpp + cocos/audio/common/utils/format.cpp + cocos/audio/android/AssetFd.cpp + cocos/audio/android/AssetFd.h + cocos/audio/android/audio.h + cocos/audio/android/AudioBufferProvider.h + cocos/audio/android/AudioDecoder.cpp + cocos/audio/android/AudioDecoder.h + cocos/audio/android/AudioDecoderMp3.cpp + cocos/audio/android/AudioDecoderMp3.h + cocos/audio/android/AudioDecoderOgg.cpp + cocos/audio/android/AudioDecoderOgg.h + cocos/audio/android/AudioDecoderProvider.cpp + cocos/audio/android/AudioDecoderProvider.h + cocos/audio/android/AudioDecoderSLES.cpp + cocos/audio/android/AudioDecoderSLES.h + cocos/audio/android/AudioDecoderWav.cpp + cocos/audio/android/AudioDecoderWav.h + cocos/audio/android/AudioEngine-inl.cpp + cocos/audio/android/AudioEngine-inl.h + cocos/audio/android/AudioMixer.cpp + cocos/audio/android/AudioMixer.h + cocos/audio/android/AudioMixerController.cpp + cocos/audio/android/AudioMixerController.h + cocos/audio/android/AudioMixerOps.h + cocos/audio/android/AudioPlayerProvider.cpp + cocos/audio/android/AudioPlayerProvider.h + cocos/audio/android/AudioResampler.cpp + cocos/audio/android/AudioResampler.h + cocos/audio/android/AudioResamplerCubic.cpp + cocos/audio/android/AudioResamplerCubic.h + cocos/audio/android/AudioResamplerPublic.h + cocos/audio/android/cutils/bitops.h + cocos/audio/android/cutils/log.h + cocos/audio/android/IAudioPlayer.h + cocos/audio/android/ICallerThreadUtils.h + cocos/audio/android/IVolumeProvider.h + cocos/audio/android/mp3reader.cpp + cocos/audio/android/mp3reader.h + cocos/audio/android/OpenSLHelper.h + cocos/audio/android/PcmAudioPlayer.cpp + cocos/audio/android/PcmAudioPlayer.h + cocos/audio/android/PcmAudioService.cpp + cocos/audio/android/PcmAudioService.h + cocos/audio/android/PcmBufferProvider.cpp + cocos/audio/android/PcmBufferProvider.h + cocos/audio/android/PcmData.cpp + cocos/audio/android/PcmData.h + cocos/audio/android/Track.cpp + cocos/audio/android/Track.h + cocos/audio/android/UrlAudioPlayer.cpp + cocos/audio/android/UrlAudioPlayer.h + cocos/audio/android/utils/Compat.h + cocos/audio/android/utils/Errors.h + cocos/audio/android/utils/Utils.cpp + cocos/audio/android/utils/Utils.h + ) + elseif(OHOS) + cocos_source_files( + cocos/audio/common/utils/tinysndfile.cpp + cocos/audio/common/utils/primitives.cpp + cocos/audio/common/utils/include/tinysndfile.h + cocos/audio/common/utils/include/primitives.h + cocos/audio/common/decoder/AudioDecoder.cpp + cocos/audio/common/decoder/AudioDecoder.h + cocos/audio/common/decoder/AudioDecoderManager.cpp + cocos/audio/common/decoder/AudioDecoderManager.h + cocos/audio/common/decoder/AudioDecoderMp3.cpp + cocos/audio/common/decoder/AudioDecoderMp3.h + cocos/audio/common/decoder/AudioDecoderOgg.cpp + cocos/audio/common/decoder/AudioDecoderOgg.h + cocos/audio/common/decoder/AudioDecoderWav.cpp + cocos/audio/common/decoder/AudioDecoderWav.h + cocos/audio/oalsoft/AudioCache.cpp + cocos/audio/oalsoft/AudioCache.h + cocos/audio/oalsoft/AudioEngine-soft.cpp + cocos/audio/oalsoft/AudioEngine-soft.h + cocos/audio/include/AudioMacros.h + cocos/audio/oalsoft/AudioPlayer.cpp + cocos/audio/oalsoft/AudioPlayer.h + cocos/audio/ohos/FsCallback.h + cocos/audio/ohos/FsCallback.cpp + ) + elseif(APPLE) + cocos_source_files( + cocos/audio/apple/AudioDecoder.h + NO_WERROR NO_UBUILD cocos/audio/apple/AudioPlayer.mm + NO_WERROR NO_UBUILD cocos/audio/apple/AudioDecoder.mm + cocos/audio/apple/AudioPlayer.h + NO_WERROR NO_UBUILD cocos/audio/apple/AudioEngine-inl.mm + cocos/audio/apple/AudioMacros.h + NO_WERROR NO_UBUILD cocos/audio/apple/AudioCache.mm + cocos/audio/apple/AudioCache.h + cocos/audio/apple/AudioEngine-inl.h + ) + endif() + +endif() + +##### plugins +cocos_source_files( + cocos/plugins/Plugins.h + cocos/plugins/Plugins.cpp + cocos/plugins/bus/BusTypes.h + cocos/plugins/bus/EventBus.h + cocos/plugins/bus/EventBus.cpp +) + +##### base +cocos_source_files( + cocos/base/Agent.h + cocos/base/astc.cpp + cocos/base/astc.h + cocos/base/base64.cpp + cocos/base/base64.h + cocos/base/Config.h + cocos/base/csscolorparser.cpp + cocos/base/csscolorparser.h + cocos/base/DeferredReleasePool.cpp + cocos/base/DeferredReleasePool.h + cocos/base/etc1.cpp + cocos/base/etc1.h + cocos/base/etc2.cpp + cocos/base/etc2.h + cocos/base/IndexHandle.h + cocos/base/Locked.h + cocos/base/Macros.h + cocos/base/Object.h + cocos/base/Ptr.h + cocos/base/Random.h + cocos/base/RefCounted.cpp + cocos/base/RefCounted.h + cocos/base/RefMap.h + cocos/base/RefVector.h + cocos/base/Scheduler.cpp + cocos/base/Scheduler.h + cocos/base/StringHandle.cpp + cocos/base/StringHandle.h + cocos/base/StringPool.h + cocos/base/StringUtil.cpp + cocos/base/StringUtil.h + cocos/base/ThreadPool.cpp + cocos/base/ThreadPool.h + cocos/base/TypeDef.h + cocos/base/std/any.h + cocos/base/std/optional.h + cocos/base/std/variant.h + cocos/base/std/container/array.h + cocos/base/std/container/deque.h + cocos/base/std/container/list.h + cocos/base/std/container/map.h + cocos/base/std/container/queue.h + cocos/base/std/container/set.h + cocos/base/std/container/string.h + cocos/base/std/container/unordered_map.h + cocos/base/std/container/unordered_set.h + cocos/base/std/container/vector.h + cocos/base/std/hash/detail/float_functions.hpp + cocos/base/std/hash/detail/hash_float.hpp + cocos/base/std/hash/detail/limits.hpp + cocos/base/std/hash/extensions.hpp + cocos/base/std/hash/hash_fwd.hpp + cocos/base/std/hash/hash.h +) + +############ application +cocos_source_files( + cocos/application/BaseApplication.h + cocos/application/CocosApplication.h + cocos/application/CocosApplication.cpp + cocos/application/ApplicationManager.h + cocos/application/ApplicationManager.cpp + cocos/application/BaseGame.h + cocos/application/BaseGame.cpp +) + +############ engine +cocos_source_files( + cocos/engine/BaseEngine.cpp + cocos/engine/BaseEngine.h + cocos/engine/Engine.cpp + cocos/engine/Engine.h +) + +############ main +if(NOT USE_SERVER_MODE AND (WINDOWS OR LINUX)) +cocos_source_files( + cocos/platform/SDLHelper.h + cocos/platform/SDLHelper.cpp +) +endif() + +############ platform +cocos_source_files( + cocos/platform/IEventDispatch.h + cocos/platform/BasePlatform.cpp + cocos/platform/BasePlatform.h + cocos/platform/UniversalPlatform.cpp + cocos/platform/UniversalPlatform.h +) +if(WINDOWS) + cocos_source_files( + cocos/platform/win32/WindowsPlatform.cpp + cocos/platform/win32/WindowsPlatform.h + ) +elseif(LINUX) + cocos_source_files( + cocos/platform/linux/LinuxPlatform.cpp + cocos/platform/linux/LinuxPlatform.h + ) +elseif(ANDROID) + cocos_source_files( + cocos/platform/android/AndroidPlatform.cpp + cocos/platform/android/AndroidPlatform.h + ) +elseif(OHOS) + cocos_source_files( + cocos/platform/ohos/OhosPlatform.cpp + cocos/platform/ohos/OhosPlatform.h + ) +elseif(MACOSX) + cocos_source_files( + cocos/platform/mac/MacPlatform.mm + cocos/platform/mac/MacPlatform.h + cocos/platform/mac/ViewController.h + cocos/platform/mac/ViewController.mm + cocos/platform/mac/AppDelegate.h + cocos/platform/mac/AppDelegate.mm + ) +elseif(IOS) + cocos_source_files( + cocos/platform/ios/IOSPlatform.mm + cocos/platform/ios/IOSPlatform.h + cocos/platform/ios/AppDelegateBridge.mm + cocos/platform/ios/AppDelegateBridge.h + ) +endif() + +############ platform : Abstract interface +cocos_source_files( + cocos/platform/interfaces/OSInterface.cpp + cocos/platform/interfaces/OSInterface.h +) + +############ platform : Interface definition +cocos_source_files( + cocos/platform/interfaces/modules/Device.cpp + cocos/platform/interfaces/modules/Device.h + cocos/platform/interfaces/modules/IAccelerometer.h + cocos/platform/interfaces/modules/IBattery.h + cocos/platform/interfaces/modules/IScreen.h + cocos/platform/interfaces/modules/INetwork.h + cocos/platform/interfaces/modules/ISystem.cpp + cocos/platform/interfaces/modules/ISystem.h + cocos/platform/interfaces/modules/ISystemWindow.h + cocos/platform/interfaces/modules/IVibrator.h + cocos/platform/interfaces/modules/XRCommon.h + cocos/platform/interfaces/modules/IXRInterface.h +) + +cocos_source_files( + cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.cpp + cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.h + cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.cpp + cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.h +) +if(USE_SERVER_MODE) + cocos_source_files( + cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.cpp + cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.h + ) +elseif(WINDOWS) + cocos_source_files( + cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.cpp + cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.h + ) +elseif(ANDROID OR OHOS) + cocos_source_files( + cocos/platform/java/modules/CanvasRenderingContext2DDelegate.cpp + cocos/platform/java/modules/CanvasRenderingContext2DDelegate.h + ) +elseif(MACOSX OR IOS) + cocos_source_files( + cocos/platform/apple/modules/CanvasRenderingContext2DDelegate.mm + cocos/platform/apple/modules/CanvasRenderingContext2DDelegate.h + ) +elseif(LINUX) + cocos_source_files( + cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.cpp + cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.h + ) +endif() + +############ platform : Interface implementation of windows + +if(WINDOWS) + cocos_source_files( + cocos/platform/win32/modules/Accelerometer.cpp + cocos/platform/win32/modules/Accelerometer.h + cocos/platform/win32/modules/Battery.cpp + cocos/platform/win32/modules/Battery.h + cocos/platform/win32/modules/Network.cpp + cocos/platform/win32/modules/Network.h + cocos/platform/win32/modules/Vibrator.cpp + cocos/platform/win32/modules/Vibrator.h + cocos/platform/win32/modules/System.cpp + cocos/platform/win32/modules/System.h + ) + if(USE_SERVER_MODE) + cocos_source_files( + cocos/platform/empty/modules/Screen.cpp + cocos/platform/empty/modules/Screen.h + cocos/platform/empty/modules/SystemWindow.cpp + cocos/platform/empty/modules/SystemWindow.h + ) + else() + cocos_source_files( + cocos/platform/win32/modules/Screen.cpp + cocos/platform/win32/modules/Screen.h + cocos/platform/win32/modules/SystemWindow.cpp + cocos/platform/win32/modules/SystemWindow.h + ) + endif() +elseif(ANDROID OR OHOS) + cocos_source_files( + cocos/platform/java/modules/Accelerometer.cpp + cocos/platform/java/modules/Accelerometer.h + cocos/platform/java/modules/Battery.cpp + cocos/platform/java/modules/Battery.h + cocos/platform/java/modules/CommonScreen.cpp + cocos/platform/java/modules/CommonScreen.h + cocos/platform/java/modules/Network.cpp + cocos/platform/java/modules/Network.h + cocos/platform/java/modules/Vibrator.cpp + cocos/platform/java/modules/Vibrator.h + cocos/platform/java/modules/CommonSystem.cpp + cocos/platform/java/modules/CommonSystem.h + cocos/platform/java/modules/SystemWindow.cpp + cocos/platform/java/modules/SystemWindow.h + cocos/platform/java/modules/XRInterface.cpp + cocos/platform/java/modules/XRInterface.h + ) +endif() + +if(ANDROID) + cocos_source_files( + cocos/platform/android/modules/Screen.cpp + cocos/platform/android/modules/Screen.h + cocos/platform/android/modules/System.cpp + cocos/platform/android/modules/System.h + ) +elseif(OHOS) + cocos_source_files( + cocos/platform/ohos/modules/Screen.cpp + cocos/platform/ohos/modules/Screen.h + cocos/platform/ohos/modules/System.cpp + cocos/platform/ohos/modules/System.h + ) +elseif(MACOSX) + cocos_source_files( + NO_WERROR cocos/platform/mac/modules/Accelerometer.mm + cocos/platform/mac/modules/Accelerometer.h + cocos/platform/mac/modules/Battery.mm + cocos/platform/mac/modules/Battery.h + cocos/platform/mac/modules/Network.mm + cocos/platform/mac/modules/Network.h + cocos/platform/mac/modules/Vibrator.mm + cocos/platform/mac/modules/Vibrator.h + cocos/platform/mac/modules/System.mm + cocos/platform/mac/modules/System.h + ) + if(USE_SERVER_MODE) + cocos_source_files( + cocos/platform/empty/modules/Screen.cpp + cocos/platform/empty/modules/Screen.h + cocos/platform/empty/modules/SystemWindow.cpp + cocos/platform/empty/modules/SystemWindow.h + ) + else() + cocos_source_files( + NO_WERROR NO_UBUILD cocos/platform/mac/modules/Screen.mm + cocos/platform/mac/modules/Screen.h + cocos/platform/mac/modules/SystemWindow.mm + cocos/platform/mac/modules/SystemWindow.h + ) + endif() +elseif(IOS) + cocos_source_files( + NO_WERROR NO_UBUILD cocos/platform/ios/modules/Accelerometer.mm + cocos/platform/ios/modules/Accelerometer.h + cocos/platform/ios/modules/Battery.mm + cocos/platform/ios/modules/Battery.h + NO_WERROR NO_UBUILD cocos/platform/ios/modules/Screen.mm + cocos/platform/ios/modules/Screen.h + cocos/platform/ios/modules/Network.mm + cocos/platform/ios/modules/Network.h + cocos/platform/ios/modules/Vibrator.mm + cocos/platform/ios/modules/Vibrator.h + cocos/platform/ios/modules/System.mm + cocos/platform/ios/modules/System.h + cocos/platform/ios/modules/SystemWindow.mm + cocos/platform/ios/modules/SystemWindow.h + ) +elseif(LINUX) + cocos_source_files( + cocos/platform/linux/modules/Accelerometer.cpp + cocos/platform/linux/modules/Accelerometer.h + cocos/platform/linux/modules/Battery.cpp + cocos/platform/linux/modules/Battery.h + cocos/platform/linux/modules/Network.cpp + cocos/platform/linux/modules/Network.h + cocos/platform/linux/modules/Vibrator.cpp + cocos/platform/linux/modules/Vibrator.h + cocos/platform/linux/modules/System.cpp + cocos/platform/linux/modules/System.h + ) + if(USE_SERVER_MODE) + cocos_source_files( + cocos/platform/empty/modules/Screen.cpp + cocos/platform/empty/modules/Screen.h + cocos/platform/empty/modules/SystemWindow.cpp + cocos/platform/empty/modules/SystemWindow.h + ) + else() + cocos_source_files( + cocos/platform/linux/modules/Screen.cpp + cocos/platform/linux/modules/Screen.h + cocos/platform/linux/modules/SystemWindow.cpp + cocos/platform/linux/modules/SystemWindow.h + ) + endif() +endif() + +############ module log +cocos_source_files(MODULE cclog + cocos/base/Log.cpp + cocos/base/Log.h +) + +cocos_source_files(MODULE cclog + cocos/base/LogRemote.cpp +) + +############ module log +cocos_source_files(MODULE ccunzip + cocos/base/ZipUtils.cpp + cocos/base/ZipUtils.h +) + +##### memory +cocos_source_files( + cocos/base/memory/Memory.h + cocos/base/memory/MemoryHook.cpp + cocos/base/memory/MemoryHook.h + cocos/base/memory/CallStack.cpp + cocos/base/memory/CallStack.h +) + +##### threading +cocos_source_files( + cocos/base/threading/ConditionVariable.h + cocos/base/threading/ConditionVariable.cpp + cocos/base/threading/Event.h + cocos/base/threading/MessageQueue.h + cocos/base/threading/MessageQueue.cpp + cocos/base/threading/Semaphore.h + cocos/base/threading/Semaphore.cpp + cocos/base/threading/ThreadPool.h + cocos/base/threading/ThreadPool.cpp + cocos/base/threading/ThreadSafeCounter.h + cocos/base/threading/ThreadSafeLinearAllocator.h + cocos/base/threading/ThreadSafeLinearAllocator.cpp +) +if(APPLE) +cocos_source_files( + cocos/base/threading/AutoReleasePool.h + cocos/base/threading/AutoReleasePool-apple.mm +) +else() +cocos_source_files( + cocos/base/threading/AutoReleasePool.h + cocos/base/threading/AutoReleasePool.cpp +) +endif() + +##### job system +cocos_source_files( + cocos/base/job-system/JobSystem.h +) + +if(USE_JOB_SYSTEM_TASKFLOW) + cocos_source_files( + cocos/base/job-system/job-system-taskflow/TFJobGraph.h + cocos/base/job-system/job-system-taskflow/TFJobGraph.cpp + cocos/base/job-system/job-system-taskflow/TFJobSystem.h + cocos/base/job-system/job-system-taskflow/TFJobSystem.cpp + ) +elseif(USE_JOB_SYSTEM_TBB) + cocos_source_files( + cocos/base/job-system/job-system-tbb/TBBJobGraph.h + cocos/base/job-system/job-system-tbb/TBBJobGraph.cpp + cocos/base/job-system/job-system-tbb/TBBJobSystem.h + cocos/base/job-system/job-system-tbb/TBBJobSystem.cpp + ) +else() + cocos_source_files( + cocos/base/job-system/job-system-dummy/DummyJobGraph.h + cocos/base/job-system/job-system-dummy/DummyJobGraph.cpp + cocos/base/job-system/job-system-dummy/DummyJobSystem.h + cocos/base/job-system/job-system-dummy/DummyJobSystem.cpp + ) +endif() + +######### module math +cocos_source_files(MODULE ccmath + cocos/math/Utils.h + cocos/math/Utils.cpp + cocos/math/Geometry.cpp + cocos/math/Geometry.h + cocos/math/Color.cpp + cocos/math/Color.h + cocos/math/Math.h + cocos/math/Math.cpp + cocos/math/MathBase.h + cocos/math/Vertex.cpp + cocos/math/Vertex.h + cocos/math/Mat3.cpp + cocos/math/Mat3.h + cocos/math/Mat4.cpp + cocos/math/Mat4.h + cocos/math/Mat4.inl + cocos/math/MathUtil.cpp + cocos/math/MathUtil.h + cocos/math/MathUtil.inl + cocos/math/MathUtilNeon.inl + cocos/math/MathUtilNeon64.inl + cocos/math/MathUtilSSE.inl + cocos/math/Quaternion.cpp + cocos/math/Quaternion.h + cocos/math/Quaternion.inl + cocos/math/Vec2.cpp + cocos/math/Vec2.h + cocos/math/Vec2.inl + cocos/math/Vec3.cpp + cocos/math/Vec3.h + cocos/math/Vec3.inl + cocos/math/Vec4.cpp + cocos/math/Vec4.h + cocos/math/Vec4.inl +) + +##### network +cocos_source_files( + cocos/network/Downloader.cpp + cocos/network/Downloader.h + cocos/network/DownloaderImpl.h + cocos/network/HttpClient.h + cocos/network/HttpCookie.cpp + cocos/network/HttpCookie.h + cocos/network/HttpRequest.h + cocos/network/HttpResponse.h + cocos/network/Uri.cpp + cocos/network/Uri.h + ) + +if(USE_SOCKET) + cocos_source_files( + cocos/network/WebSocket.h + cocos/network/SocketIO.cpp + cocos/network/SocketIO.h + ) +endif() + +if(NOT IOS AND USE_WEBSOCKET_SERVER) + cocos_source_files( + cocos/network/WebSocketServer.h + cocos/network/WebSocketServer.cpp + ) +endif() + +if(APPLE) + cocos_source_files( + cocos/network/DownloaderImpl-apple.h + cocos/network/DownloaderImpl-apple.mm + cocos/network/HttpAsynConnection-apple.h + NO_WERROR NO_UBUILD cocos/network/HttpAsynConnection-apple.m + NO_UBUILD cocos/network/HttpClient-apple.mm + ) + if(USE_SOCKET) + cocos_source_files( + cocos/network/WebSocket-apple.mm + ) + set_source_files_properties(${CWD}/cocos/network/WebSocket-apple.mm PROPERTIES + COMPILE_FLAGS -fobjc-arc + ) + endif() +endif() + +if(ANDROID OR OHOS) + cocos_source_files( + cocos/network/Downloader-java.cpp + cocos/network/Downloader-java.h + cocos/network/HttpClient-java.cpp + ) +endif() + +if(NOT APPLE AND USE_SOCKET) + if(ANDROID) + cocos_source_files( + NO_WERROR cocos/network/WebSocket-okhttp.cpp + ) + else() + cocos_source_files( + NO_WERROR cocos/network/WebSocket-libwebsockets.cpp + ) + endif() +endif() + +if(WINDOWS OR LINUX OR QNX) + cocos_source_files( + NO_WERROR cocos/network/Downloader-curl.cpp + cocos/network/Downloader-curl.h + ) +endif() + +if(WINDOWS OR MACOSX OR LINUX OR QNX) + cocos_source_files( + NO_WERROR NO_UBUILD cocos/network/HttpClient.cpp + ) +endif() + + +##### platform +cocos_source_files( + cocos/platform/Image.cpp + cocos/platform/Image.h + cocos/platform/StdC.h +) + +########## module utils +cocos_source_files(MODULE ccutils + cocos/base/Data.cpp + cocos/base/Data.h + cocos/base/Value.cpp + cocos/base/Value.h + cocos/base/UTF8.cpp + cocos/base/UTF8.h + cocos/platform/SAXParser.cpp + cocos/platform/SAXParser.h + cocos/base/Utils.cpp + cocos/base/Utils.h + cocos/base/Timer.cpp + cocos/base/Timer.h +) + +########## module ccfilesystem +cocos_source_files(MODULE ccfilesystem + cocos/platform/FileUtils.cpp + cocos/platform/FileUtils.h +) + +if(WINDOWS) + cocos_source_files(MODULE ccutils + cocos/platform/win32/Utils-win32.cpp + cocos/platform/win32/Utils-win32.h + ) +endif() + +if(WINDOWS) + cocos_source_files( + cocos/platform/win32/compat + cocos/platform/win32/compat/stdint.h + ) + cocos_source_files(MODULE ccfilesystem + cocos/platform/win32/FileUtils-win32.cpp + cocos/platform/win32/FileUtils-win32.h + ) +elseif(ANDROID) + set(CC_JNI_SRC_FILES + ${CWD}/cocos/platform/android/jni/JniCocosEntry.cpp + ${CWD}/cocos/platform/java/jni/JniCocosOrientationHelper.cpp + ${CWD}/cocos/platform/java/jni/JniHelper.cpp + ${CWD}/cocos/platform/java/jni/JniHelper.h + ${CWD}/cocos/platform/java/jni/JniImp.cpp + ${CWD}/cocos/platform/java/jni/JniImp.h + ${CWD}/cocos/platform/java/jni/glue/MessagePipe.cpp + ${CWD}/cocos/platform/java/jni/glue/MessagePipe.h + ) + + cocos_source_files(MODULE ccfilesystem + cocos/platform/android/FileUtils-android.cpp + cocos/platform/android/FileUtils-android.h + ) +elseif(OHOS) + set(CC_JNI_SRC_FILES + ${CWD}/cocos/platform/ohos/jni/JniCocosAbility.cpp + ${CWD}/cocos/platform/ohos/jni/JniCocosAbility.h + ${CWD}/cocos/platform/java/jni/JniHelper.cpp + ${CWD}/cocos/platform/java/jni/JniHelper.h + ${CWD}/cocos/platform/java/jni/JniImp.cpp + ${CWD}/cocos/platform/java/jni/JniImp.h + ${CWD}/cocos/platform/java/jni/JniCocosTouchHandler.cpp + ${CWD}/cocos/platform/java/jni/JniCocosKeyCodeHandler.cpp + ${CWD}/cocos/platform/java/jni/JniCocosOrientationHelper.cpp + ${CWD}/cocos/platform/ohos/jni/AbilityConsts.h + ${CWD}/cocos/platform/java/jni/glue/JniNativeGlue.cpp + ${CWD}/cocos/platform/java/jni/glue/JniNativeGlue.h + ${CWD}/cocos/platform/java/jni/glue/MessagePipe.cpp + ${CWD}/cocos/platform/java/jni/glue/MessagePipe.h + ) + cocos_source_files(MODULE ccfilesystem + cocos/platform/ohos/FileUtils-ohos.cpp + cocos/platform/ohos/FileUtils-ohos.h + ) +elseif(APPLE) + cocos_source_files( + cocos/platform/apple/Reachability.h + cocos/platform/apple/Reachability.cpp + ) + + cocos_source_files(MODULE ccfilesystem + cocos/platform/apple/FileUtils-apple.h + cocos/platform/apple/FileUtils-apple.mm + ) + if(MACOSX) + cocos_source_files( + cocos/platform/mac/View.h + cocos/platform/mac/View.mm + cocos/platform/mac/KeyCodeHelper.h + cocos/platform/mac/KeyCodeHelper.cpp + ) + elseif(IOS) + cocos_source_files( + cocos/platform/ios/View.h + NO_WERROR NO_UBUILD cocos/platform/ios/View.mm # CAMetalLayer bug for apple + ) + endif() +elseif(LINUX) + cocos_source_files(MODULE ccfilesystem + cocos/platform/linux/FileUtils-linux.cpp + cocos/platform/linux/FileUtils-linux.h + ) +endif() + +##### renderer +cocos_source_files( + cocos/renderer/core/PassUtils.h + cocos/renderer/core/PassUtils.cpp + cocos/renderer/core/ProgramLib.h + cocos/renderer/core/ProgramLib.cpp + cocos/renderer/core/MaterialInstance.h + cocos/renderer/core/MaterialInstance.cpp + cocos/renderer/core/PassInstance.h + cocos/renderer/core/PassInstance.cpp + cocos/renderer/core/TextureBufferPool.h + cocos/renderer/core/TextureBufferPool.cpp + + cocos/renderer/GFXDeviceManager.h + + cocos/renderer/gfx-base/SPIRVUtils.h + cocos/renderer/gfx-base/SPIRVUtils.cpp + cocos/renderer/gfx-base/GFXObject.h + cocos/renderer/gfx-base/GFXObject.cpp + cocos/renderer/gfx-base/GFXBuffer.cpp + cocos/renderer/gfx-base/GFXBuffer.h + cocos/renderer/gfx-base/GFXCommandBuffer.cpp + cocos/renderer/gfx-base/GFXCommandBuffer.h + cocos/renderer/gfx-base/GFXDef.cpp + cocos/renderer/gfx-base/GFXDef.h + cocos/renderer/gfx-base/GFXDef-common.h + cocos/renderer/gfx-base/GFXDevice.cpp + cocos/renderer/gfx-base/GFXDevice.h + cocos/renderer/gfx-base/GFXFramebuffer.cpp + cocos/renderer/gfx-base/GFXFramebuffer.h + cocos/renderer/gfx-base/GFXInputAssembler.cpp + cocos/renderer/gfx-base/GFXInputAssembler.h + cocos/renderer/gfx-base/GFXDescriptorSet.cpp + cocos/renderer/gfx-base/GFXDescriptorSet.h + cocos/renderer/gfx-base/GFXDescriptorSetLayout.cpp + cocos/renderer/gfx-base/GFXDescriptorSetLayout.h + cocos/renderer/gfx-base/GFXPipelineLayout.cpp + cocos/renderer/gfx-base/GFXPipelineLayout.h + cocos/renderer/gfx-base/GFXPipelineState.cpp + cocos/renderer/gfx-base/GFXPipelineState.h + cocos/renderer/gfx-base/GFXQueue.cpp + cocos/renderer/gfx-base/GFXQueue.h + cocos/renderer/gfx-base/GFXQueryPool.cpp + cocos/renderer/gfx-base/GFXQueryPool.h + cocos/renderer/gfx-base/GFXRenderPass.cpp + cocos/renderer/gfx-base/GFXRenderPass.h + cocos/renderer/gfx-base/GFXShader.cpp + cocos/renderer/gfx-base/GFXShader.h + cocos/renderer/gfx-base/GFXSwapchain.cpp + cocos/renderer/gfx-base/GFXSwapchain.h + cocos/renderer/gfx-base/GFXTexture.cpp + cocos/renderer/gfx-base/GFXTexture.h + cocos/renderer/gfx-base/states/GFXGeneralBarrier.cpp + cocos/renderer/gfx-base/states/GFXGeneralBarrier.h + cocos/renderer/gfx-base/states/GFXSampler.cpp + cocos/renderer/gfx-base/states/GFXSampler.h + cocos/renderer/gfx-base/states/GFXTextureBarrier.cpp + cocos/renderer/gfx-base/states/GFXTextureBarrier.h + cocos/renderer/gfx-base/states/GFXBufferBarrier.h + cocos/renderer/gfx-base/states/GFXBufferBarrier.cpp + + cocos/renderer/gfx-agent/BufferAgent.h + cocos/renderer/gfx-agent/BufferAgent.cpp + cocos/renderer/gfx-agent/CommandBufferAgent.h + cocos/renderer/gfx-agent/CommandBufferAgent.cpp + cocos/renderer/gfx-agent/DescriptorSetAgent.h + cocos/renderer/gfx-agent/DescriptorSetAgent.cpp + cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.h + cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.cpp + cocos/renderer/gfx-agent/DeviceAgent.h + cocos/renderer/gfx-agent/DeviceAgent.cpp + cocos/renderer/gfx-agent/FramebufferAgent.h + cocos/renderer/gfx-agent/FramebufferAgent.cpp + cocos/renderer/gfx-agent/InputAssemblerAgent.h + cocos/renderer/gfx-agent/InputAssemblerAgent.cpp + cocos/renderer/gfx-agent/PipelineLayoutAgent.h + cocos/renderer/gfx-agent/PipelineLayoutAgent.cpp + cocos/renderer/gfx-agent/PipelineStateAgent.h + cocos/renderer/gfx-agent/PipelineStateAgent.cpp + cocos/renderer/gfx-agent/QueueAgent.h + cocos/renderer/gfx-agent/QueueAgent.cpp + cocos/renderer/gfx-agent/QueryPoolAgent.h + cocos/renderer/gfx-agent/QueryPoolAgent.cpp + cocos/renderer/gfx-agent/RenderPassAgent.h + cocos/renderer/gfx-agent/RenderPassAgent.cpp + cocos/renderer/gfx-agent/SwapchainAgent.h + cocos/renderer/gfx-agent/SwapchainAgent.cpp + cocos/renderer/gfx-agent/ShaderAgent.h + cocos/renderer/gfx-agent/ShaderAgent.cpp + cocos/renderer/gfx-agent/TextureAgent.h + cocos/renderer/gfx-agent/TextureAgent.cpp + + cocos/renderer/gfx-validator/BufferValidator.h + cocos/renderer/gfx-validator/BufferValidator.cpp + cocos/renderer/gfx-validator/CommandBufferValidator.h + cocos/renderer/gfx-validator/CommandBufferValidator.cpp + cocos/renderer/gfx-validator/DescriptorSetValidator.h + cocos/renderer/gfx-validator/DescriptorSetValidator.cpp + cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.h + cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.cpp + cocos/renderer/gfx-validator/DeviceValidator.h + cocos/renderer/gfx-validator/DeviceValidator.cpp + cocos/renderer/gfx-validator/FramebufferValidator.h + cocos/renderer/gfx-validator/FramebufferValidator.cpp + cocos/renderer/gfx-validator/InputAssemblerValidator.h + cocos/renderer/gfx-validator/InputAssemblerValidator.cpp + cocos/renderer/gfx-validator/PipelineLayoutValidator.h + cocos/renderer/gfx-validator/PipelineLayoutValidator.cpp + cocos/renderer/gfx-validator/PipelineStateValidator.h + cocos/renderer/gfx-validator/PipelineStateValidator.cpp + cocos/renderer/gfx-validator/QueueValidator.h + cocos/renderer/gfx-validator/QueueValidator.cpp + cocos/renderer/gfx-validator/QueryPoolValidator.h + cocos/renderer/gfx-validator/QueryPoolValidator.cpp + cocos/renderer/gfx-validator/RenderPassValidator.h + cocos/renderer/gfx-validator/RenderPassValidator.cpp + cocos/renderer/gfx-validator/ShaderValidator.h + cocos/renderer/gfx-validator/ShaderValidator.cpp + cocos/renderer/gfx-validator/SwapchainValidator.h + cocos/renderer/gfx-validator/SwapchainValidator.cpp + cocos/renderer/gfx-validator/TextureValidator.h + cocos/renderer/gfx-validator/TextureValidator.cpp + cocos/renderer/gfx-validator/ValidationUtils.h + cocos/renderer/gfx-validator/ValidationUtils.cpp + + cocos/renderer/gfx-empty/EmptyBuffer.h + cocos/renderer/gfx-empty/EmptyBuffer.cpp + cocos/renderer/gfx-empty/EmptyCommandBuffer.h + cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp + cocos/renderer/gfx-empty/EmptyDescriptorSet.h + cocos/renderer/gfx-empty/EmptyDescriptorSet.cpp + cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.h + cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.cpp + cocos/renderer/gfx-empty/EmptyDevice.h + cocos/renderer/gfx-empty/EmptyDevice.cpp + cocos/renderer/gfx-empty/EmptyFramebuffer.h + cocos/renderer/gfx-empty/EmptyFramebuffer.cpp + cocos/renderer/gfx-empty/EmptyInputAssembler.h + cocos/renderer/gfx-empty/EmptyInputAssembler.cpp + cocos/renderer/gfx-empty/EmptyPipelineLayout.h + cocos/renderer/gfx-empty/EmptyPipelineLayout.cpp + cocos/renderer/gfx-empty/EmptyPipelineState.h + cocos/renderer/gfx-empty/EmptyPipelineState.cpp + cocos/renderer/gfx-empty/EmptyQueue.h + cocos/renderer/gfx-empty/EmptyQueue.cpp + cocos/renderer/gfx-empty/EmptyQueryPool.h + cocos/renderer/gfx-empty/EmptyQueryPool.cpp + cocos/renderer/gfx-empty/EmptyRenderPass.h + cocos/renderer/gfx-empty/EmptyRenderPass.cpp + cocos/renderer/gfx-empty/EmptyShader.h + cocos/renderer/gfx-empty/EmptyShader.cpp + cocos/renderer/gfx-empty/EmptySwapchain.h + cocos/renderer/gfx-empty/EmptySwapchain.cpp + cocos/renderer/gfx-empty/EmptyTexture.h + cocos/renderer/gfx-empty/EmptyTexture.cpp + + cocos/renderer/pipeline/BatchedBuffer.cpp + cocos/renderer/pipeline/BatchedBuffer.h + cocos/renderer/pipeline/ClusterLightCulling.cpp + cocos/renderer/pipeline/ClusterLightCulling.h + cocos/renderer/pipeline/Define.h + cocos/renderer/pipeline/Define.cpp + cocos/renderer/pipeline/GlobalDescriptorSetManager.h + cocos/renderer/pipeline/GlobalDescriptorSetManager.cpp + cocos/renderer/pipeline/InstancedBuffer.cpp + cocos/renderer/pipeline/InstancedBuffer.h + cocos/renderer/pipeline/PipelineStateManager.cpp + cocos/renderer/pipeline/PipelineStateManager.h + cocos/renderer/pipeline/RenderAdditiveLightQueue.cpp + cocos/renderer/pipeline/RenderAdditiveLightQueue.h + cocos/renderer/pipeline/RenderBatchedQueue.cpp + cocos/renderer/pipeline/RenderBatchedQueue.h + cocos/renderer/pipeline/RenderFlow.cpp + cocos/renderer/pipeline/RenderFlow.h + cocos/renderer/pipeline/RenderInstancedQueue.cpp + cocos/renderer/pipeline/RenderInstancedQueue.h + cocos/renderer/pipeline/RenderPipeline.cpp + cocos/renderer/pipeline/RenderPipeline.h + cocos/renderer/pipeline/RenderQueue.cpp + cocos/renderer/pipeline/RenderQueue.h + cocos/renderer/pipeline/RenderStage.cpp + cocos/renderer/pipeline/RenderStage.h + cocos/renderer/pipeline/PlanarShadowQueue.cpp + cocos/renderer/pipeline/PlanarShadowQueue.h + cocos/renderer/pipeline/ShadowMapBatchedQueue.cpp + cocos/renderer/pipeline/ShadowMapBatchedQueue.h + cocos/renderer/pipeline/PipelineUBO.cpp + cocos/renderer/pipeline/PipelineUBO.h + cocos/renderer/pipeline/PipelineSceneData.cpp + cocos/renderer/pipeline/PipelineSceneData.h + cocos/renderer/pipeline/forward/ForwardFlow.cpp + cocos/renderer/pipeline/forward/ForwardFlow.h + cocos/renderer/pipeline/forward/ForwardPipeline.cpp + cocos/renderer/pipeline/forward/ForwardPipeline.h + cocos/renderer/pipeline/forward/ForwardStage.cpp + cocos/renderer/pipeline/forward/ForwardStage.h + cocos/renderer/pipeline/SceneCulling.cpp + cocos/renderer/pipeline/SceneCulling.h + cocos/renderer/pipeline/deferred/DeferredPipeline.cpp + cocos/renderer/pipeline/deferred/DeferredPipeline.h + cocos/renderer/pipeline/deferred/MainFlow.cpp + cocos/renderer/pipeline/deferred/MainFlow.h + cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.cpp + cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.h + cocos/renderer/pipeline/deferred/GbufferStage.cpp + cocos/renderer/pipeline/deferred/GbufferStage.h + cocos/renderer/pipeline/deferred/LightingStage.cpp + cocos/renderer/pipeline/deferred/LightingStage.h + cocos/renderer/pipeline/deferred/ReflectionComp.cpp + cocos/renderer/pipeline/deferred/ReflectionComp.h + cocos/renderer/pipeline/shadow/ShadowFlow.cpp + cocos/renderer/pipeline/shadow/ShadowFlow.h + cocos/renderer/pipeline/shadow/ShadowStage.cpp + cocos/renderer/pipeline/shadow/ShadowStage.h + cocos/renderer/pipeline/shadow/CSMLayers.cpp + cocos/renderer/pipeline/shadow/CSMLayers.h + cocos/renderer/pipeline/Enum.h + cocos/renderer/pipeline/deferred/BloomStage.cpp + cocos/renderer/pipeline/deferred/BloomStage.h + cocos/renderer/pipeline/deferred/PostProcessStage.cpp + cocos/renderer/pipeline/deferred/PostProcessStage.h + cocos/renderer/pipeline/UIPhase.cpp + cocos/renderer/pipeline/UIPhase.h + cocos/renderer/pipeline/helper/Utils.h + cocos/renderer/pipeline/helper/Utils.cpp + cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp + cocos/renderer/pipeline/custom/test/test.h + cocos/renderer/pipeline/custom/FGDispatcherGraphs.h + cocos/renderer/pipeline/custom/FGDispatcherTypes.cpp + cocos/renderer/pipeline/custom/FGDispatcherTypes.h + cocos/renderer/pipeline/custom/LayoutGraphFwd.h + cocos/renderer/pipeline/custom/LayoutGraphGraphs.h + cocos/renderer/pipeline/custom/LayoutGraphJsb.cpp + cocos/renderer/pipeline/custom/LayoutGraphJsb.h + cocos/renderer/pipeline/custom/LayoutGraphNames.h + cocos/renderer/pipeline/custom/LayoutGraphReflection.cpp + cocos/renderer/pipeline/custom/LayoutGraphReflection.h + cocos/renderer/pipeline/custom/LayoutGraphTypes.cpp + cocos/renderer/pipeline/custom/LayoutGraphTypes.h + cocos/renderer/pipeline/custom/NativeLayoutGraphImpl.cpp + cocos/renderer/pipeline/custom/NativePipelineFwd.h + cocos/renderer/pipeline/custom/NativePipelineGraphs.h + cocos/renderer/pipeline/custom/NativePipelineImpl.cpp + cocos/renderer/pipeline/custom/NativePipelineTypes.cpp + cocos/renderer/pipeline/custom/NativePipelineTypes.h + cocos/renderer/pipeline/custom/NativeRenderGraphSetup.cpp + cocos/renderer/pipeline/custom/RenderCommonFwd.h + cocos/renderer/pipeline/custom/RenderCommonJsb.cpp + cocos/renderer/pipeline/custom/RenderCommonJsb.h + cocos/renderer/pipeline/custom/RenderCommonNames.h + cocos/renderer/pipeline/custom/RenderCommonReflection.cpp + cocos/renderer/pipeline/custom/RenderCommonReflection.h + cocos/renderer/pipeline/custom/RenderCommonTypes.cpp + cocos/renderer/pipeline/custom/RenderCommonTypes.h + cocos/renderer/pipeline/custom/RenderGraphFwd.h + cocos/renderer/pipeline/custom/RenderGraphGraphs.h + cocos/renderer/pipeline/custom/RenderGraphJsb.cpp + cocos/renderer/pipeline/custom/RenderGraphJsb.h + cocos/renderer/pipeline/custom/RenderGraphNames.h + cocos/renderer/pipeline/custom/RenderGraphReflection.cpp + cocos/renderer/pipeline/custom/RenderGraphReflection.h + cocos/renderer/pipeline/custom/RenderGraphTypes.cpp + cocos/renderer/pipeline/custom/RenderGraphTypes.h + cocos/renderer/pipeline/custom/RenderInterfaceFwd.h + cocos/renderer/pipeline/custom/RenderInterfaceImpl.cpp + cocos/renderer/pipeline/custom/RenderInterfaceTypes.cpp + cocos/renderer/pipeline/custom/RenderInterfaceTypes.h +) + +if (USE_GEOMETRY_RENDERER) + cocos_source_files( + cocos/renderer/pipeline/GeometryRenderer.h + cocos/renderer/pipeline/GeometryRenderer.cpp + ) +endif() + +##### terrain +# +# cocos_source_files( +# cocos/terrain/HeightField.cpp +# cocos/terrain/HeightField.h +# cocos/terrain/Terrain.cpp +# cocos/terrain/Terrain.h +# cocos/terrain/TerrainAsset.cpp +# cocos/terrain/TerrainAsset.h +# cocos/terrain/TerrainLod.cpp +# cocos/terrain/TerrainLod.h +# ) + + +##### scene +cocos_source_files( + cocos/scene/Ambient.h + cocos/scene/Ambient.cpp + cocos/scene/Camera.h + cocos/scene/Camera.cpp + cocos/scene/Define.h + cocos/scene/Define.cpp + cocos/scene/DirectionalLight.h + cocos/scene/DirectionalLight.cpp + cocos/scene/DrawBatch2D.h + cocos/scene/DrawBatch2D.cpp + cocos/scene/Fog.h + cocos/scene/Fog.cpp + cocos/scene/Light.h + cocos/scene/Light.cpp + cocos/scene/Model.h + cocos/scene/Model.cpp + cocos/scene/Pass.h + cocos/scene/Pass.cpp + cocos/scene/RenderScene.h + cocos/scene/RenderScene.cpp + cocos/scene/RenderWindow.cpp + cocos/scene/RenderWindow.h + cocos/scene/Skybox.h + cocos/scene/Skybox.cpp + cocos/scene/SphereLight.h + cocos/scene/SphereLight.cpp + cocos/scene/SpotLight.h + cocos/scene/SpotLight.cpp + cocos/scene/SubModel.h + cocos/scene/SubModel.cpp + cocos/scene/Octree.h + cocos/scene/Octree.cpp + cocos/scene/Shadow.h + cocos/scene/Shadow.cpp +) + +##### primitive +cocos_source_files( + cocos/primitive/Box.cpp + cocos/primitive/Box.h + cocos/primitive/Capsule.cpp + cocos/primitive/Capsule.h + cocos/primitive/Circle.cpp + cocos/primitive/Circle.h + cocos/primitive/Cone.cpp + cocos/primitive/Cone.h + cocos/primitive/Cylinder.cpp + cocos/primitive/Cylinder.h + cocos/primitive/Plane.cpp + cocos/primitive/Plane.h + cocos/primitive/Primitive.cpp + cocos/primitive/Primitive.h + cocos/primitive/PrimitiveDefine.h + cocos/primitive/PrimitiveUtils.cpp + cocos/primitive/PrimitiveUtils.h + cocos/primitive/Quad.cpp + cocos/primitive/Quad.h + cocos/primitive/Sphere.cpp + cocos/primitive/Sphere.h + cocos/primitive/Torus.cpp + cocos/primitive/Torus.h + cocos/primitive/Transform.cpp + cocos/primitive/Transform.h +) + +##### profiler +if (USE_DEBUG_RENDERER) +cocos_source_files( + cocos/profiler/DebugRenderer.h + cocos/profiler/DebugRenderer.cpp +) +endif() + +cocos_source_files( + cocos/profiler/Profiler.h + cocos/profiler/Profiler.cpp + cocos/profiler/GameStats.h +) + +##### components +cocos_source_files( + # cocos/core/components/Component.h + # cocos/core/components/Component.cpp + # cocos/core/components/RenderableComponent.h + # cocos/core/components/RenderableComponent.cpp + # cocos/core/components/CameraComponent.h + # cocos/core/components/CameraComponent.cpp + cocos/3d/models/BakedSkinningModel.h + cocos/3d/models/BakedSkinningModel.cpp + cocos/3d/models/MorphModel.h + cocos/3d/models/MorphModel.cpp + cocos/3d/models/SkinningModel.h + cocos/3d/models/SkinningModel.cpp + # cocos/3d/framework/MeshRenderer.h + # cocos/3d/framework/MeshRenderer.cpp +) + +##### animations +cocos_source_files( + cocos/core/animation/SkeletalAnimationUtils.h + cocos/core/animation/SkeletalAnimationUtils.cpp +) + +##### lights +# cocos_source_files( +# cocos/3d/lights/LightComponent.h +# cocos/3d/lights/LightComponent.cpp +# cocos/3d/lights/DirectionalLightComponent.h +# cocos/3d/lights/DirectionalLightComponent.cpp +# cocos/3d/lights/SpotLightComponent.h +# cocos/3d/lights/SpotLightComponent.cpp +# cocos/3d/lights/SphereLightComponent.h +# cocos/3d/lights/SphereLightComponent.cpp +# ) + +if(CC_USE_GLES2 OR CC_USE_GLES3) + cocos_source_files( + cocos/renderer/gfx-gles-common/GLESCommandPool.h + cocos/renderer/gfx-gles-common/eglw.cpp + cocos/renderer/gfx-gles-common/gles2w.cpp + ) + if(CC_USE_GLES3) + cocos_source_files( + cocos/renderer/gfx-gles-common/gles3w.cpp + ) + endif() +endif() + +if(CC_USE_GLES2) + cocos_source_files( + cocos/renderer/gfx-gles2/GLES2Buffer.cpp + cocos/renderer/gfx-gles2/GLES2Buffer.h + cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp + cocos/renderer/gfx-gles2/GLES2CommandBuffer.h + cocos/renderer/gfx-gles2/GLES2Commands.cpp + cocos/renderer/gfx-gles2/GLES2Commands.h + cocos/renderer/gfx-gles2/GLES2Device.cpp + cocos/renderer/gfx-gles2/GLES2Device.h + cocos/renderer/gfx-gles2/GLES2Framebuffer.cpp + cocos/renderer/gfx-gles2/GLES2Framebuffer.h + cocos/renderer/gfx-gles2/GLES2GPUContext.cpp + cocos/renderer/gfx-gles2/GLES2GPUObjects.h + cocos/renderer/gfx-gles2/GLES2InputAssembler.cpp + cocos/renderer/gfx-gles2/GLES2InputAssembler.h + cocos/renderer/gfx-gles2/GLES2DescriptorSet.cpp + cocos/renderer/gfx-gles2/GLES2DescriptorSet.h + cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.cpp + cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.h + cocos/renderer/gfx-gles2/GLES2PipelineLayout.cpp + cocos/renderer/gfx-gles2/GLES2PipelineLayout.h + cocos/renderer/gfx-gles2/GLES2PipelineState.cpp + cocos/renderer/gfx-gles2/GLES2PipelineState.h + cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp + cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h + cocos/renderer/gfx-gles2/GLES2Queue.cpp + cocos/renderer/gfx-gles2/GLES2Queue.h + cocos/renderer/gfx-gles2/GLES2QueryPool.cpp + cocos/renderer/gfx-gles2/GLES2QueryPool.h + cocos/renderer/gfx-gles2/GLES2RenderPass.cpp + cocos/renderer/gfx-gles2/GLES2RenderPass.h + cocos/renderer/gfx-gles2/GLES2Shader.cpp + cocos/renderer/gfx-gles2/GLES2Shader.h + cocos/renderer/gfx-gles2/GLES2Swapchain.cpp + cocos/renderer/gfx-gles2/GLES2Swapchain.h + cocos/renderer/gfx-gles2/GLES2Std.cpp + cocos/renderer/gfx-gles2/GLES2Std.h + cocos/renderer/gfx-gles2/GLES2Texture.cpp + cocos/renderer/gfx-gles2/GLES2Texture.h + cocos/renderer/gfx-gles2/GLES2Wrangler.cpp + cocos/renderer/gfx-gles2/GLES2Wrangler.h + cocos/renderer/gfx-gles2/states/GLES2Sampler.cpp + cocos/renderer/gfx-gles2/states/GLES2Sampler.h + ) +endif() + +if(CC_USE_GLES3) + cocos_source_files( + cocos/renderer/gfx-gles3/GLES3Buffer.cpp + cocos/renderer/gfx-gles3/GLES3Buffer.h + cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp + cocos/renderer/gfx-gles3/GLES3CommandBuffer.h + cocos/renderer/gfx-gles3/GLES3Commands.cpp + cocos/renderer/gfx-gles3/GLES3Commands.h + cocos/renderer/gfx-gles3/GLES3Device.cpp + cocos/renderer/gfx-gles3/GLES3Device.h + cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp + cocos/renderer/gfx-gles3/GLES3Framebuffer.h + cocos/renderer/gfx-gles3/GLES3GPUContext.cpp + cocos/renderer/gfx-gles3/GLES3GPUObjects.h + cocos/renderer/gfx-gles3/GLES3InputAssembler.cpp + cocos/renderer/gfx-gles3/GLES3InputAssembler.h + cocos/renderer/gfx-gles3/GLES3DescriptorSet.cpp + cocos/renderer/gfx-gles3/GLES3DescriptorSet.h + cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.cpp + cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.h + cocos/renderer/gfx-gles3/GLES3PipelineLayout.cpp + cocos/renderer/gfx-gles3/GLES3PipelineLayout.h + cocos/renderer/gfx-gles3/GLES3PipelineState.cpp + cocos/renderer/gfx-gles3/GLES3PipelineState.h + cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp + cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h + cocos/renderer/gfx-gles3/GLES3Queue.cpp + cocos/renderer/gfx-gles3/GLES3Queue.h + cocos/renderer/gfx-gles3/GLES3QueryPool.cpp + cocos/renderer/gfx-gles3/GLES3QueryPool.h + cocos/renderer/gfx-gles3/GLES3RenderPass.cpp + cocos/renderer/gfx-gles3/GLES3RenderPass.h + cocos/renderer/gfx-gles3/GLES3Shader.cpp + cocos/renderer/gfx-gles3/GLES3Shader.h + cocos/renderer/gfx-gles3/GLES3Swapchain.cpp + cocos/renderer/gfx-gles3/GLES3Swapchain.h + cocos/renderer/gfx-gles3/GLES3Std.cpp + cocos/renderer/gfx-gles3/GLES3Std.h + cocos/renderer/gfx-gles3/GLES3Texture.cpp + cocos/renderer/gfx-gles3/GLES3Texture.h + cocos/renderer/gfx-gles3/GLES3Wrangler.cpp + cocos/renderer/gfx-gles3/GLES3Wrangler.h + cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.cpp + cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.h + cocos/renderer/gfx-gles3/states/GLES3Sampler.cpp + cocos/renderer/gfx-gles3/states/GLES3Sampler.h + ) +endif() + +if(CC_USE_METAL) + cocos_source_files( + cocos/renderer/gfx-metal/MTLBuffer.h + cocos/renderer/gfx-metal/MTLBuffer.mm + cocos/renderer/gfx-metal/MTLCommandBuffer.h + cocos/renderer/gfx-metal/MTLCommandBuffer.mm + cocos/renderer/gfx-metal/MTLDevice.h + NO_WERROR NO_UBUILD cocos/renderer/gfx-metal/MTLDevice.mm # CAMetalLayer bug for apple + cocos/renderer/gfx-metal/MTLFramebuffer.mm + cocos/renderer/gfx-metal/MTLFramebuffer.h + cocos/renderer/gfx-metal/MTLGPUObjects.h + cocos/renderer/gfx-metal/MTLInputAssembler.h + cocos/renderer/gfx-metal/MTLInputAssembler.mm + cocos/renderer/gfx-metal/MTLDescriptorSetLayout.h + cocos/renderer/gfx-metal/MTLDescriptorSetLayout.mm + cocos/renderer/gfx-metal/MTLPipelineLayout.h + cocos/renderer/gfx-metal/MTLPipelineLayout.mm + cocos/renderer/gfx-metal/MTLPipelineState.h + cocos/renderer/gfx-metal/MTLPipelineState.mm + cocos/renderer/gfx-metal/MTLDescriptorSet.h + cocos/renderer/gfx-metal/MTLDescriptorSet.mm + cocos/renderer/gfx-metal/MTLQueue.h + cocos/renderer/gfx-metal/MTLQueue.mm + cocos/renderer/gfx-metal/MTLQueryPool.h + cocos/renderer/gfx-metal/MTLQueryPool.mm + cocos/renderer/gfx-metal/MTLRenderPass.h + cocos/renderer/gfx-metal/MTLRenderPass.mm + cocos/renderer/gfx-metal/MTLSampler.h + cocos/renderer/gfx-metal/MTLSampler.mm + cocos/renderer/gfx-metal/MTLShader.h + cocos/renderer/gfx-metal/MTLShader.mm + cocos/renderer/gfx-metal/MTLTexture.h + cocos/renderer/gfx-metal/MTLTexture.mm + cocos/renderer/gfx-metal/MTLUtils.h + cocos/renderer/gfx-metal/MTLUtils.mm + cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h + cocos/renderer/gfx-metal/MTLComputeCommandEncoder.h + cocos/renderer/gfx-metal/MTLCommandEncoder.h + cocos/renderer/gfx-metal/MTLConfig.h + cocos/renderer/gfx-metal/MTLSemaphore.h + cocos/renderer/gfx-metal/MTLSwapchain.h + cocos/renderer/gfx-metal/MTLSwapchain.mm + ) +endif() + +if(CC_USE_VULKAN) + + cocos_source_files( + cocos/renderer/gfx-vulkan/vk_mem_alloc.h + cocos/renderer/gfx-vulkan/VKBuffer.cpp + cocos/renderer/gfx-vulkan/VKBuffer.h + cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp + cocos/renderer/gfx-vulkan/VKCommandBuffer.h + cocos/renderer/gfx-vulkan/VKCommands.cpp + cocos/renderer/gfx-vulkan/VKCommands.h + cocos/renderer/gfx-vulkan/VKDevice.cpp + cocos/renderer/gfx-vulkan/VKDevice.h + cocos/renderer/gfx-vulkan/VKFramebuffer.cpp + cocos/renderer/gfx-vulkan/VKFramebuffer.h + cocos/renderer/gfx-vulkan/VKGPUContext.cpp + cocos/renderer/gfx-vulkan/VKGPUObjects.h + cocos/renderer/gfx-vulkan/VKInputAssembler.cpp + cocos/renderer/gfx-vulkan/VKInputAssembler.h + cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp + cocos/renderer/gfx-vulkan/VKDescriptorSet.h + cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.cpp + cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.h + cocos/renderer/gfx-vulkan/VKPipelineLayout.cpp + cocos/renderer/gfx-vulkan/VKPipelineLayout.h + cocos/renderer/gfx-vulkan/VKPipelineState.cpp + cocos/renderer/gfx-vulkan/VKPipelineState.h + cocos/renderer/gfx-vulkan/VKQueue.cpp + cocos/renderer/gfx-vulkan/VKQueue.h + cocos/renderer/gfx-vulkan/VKQueryPool.cpp + cocos/renderer/gfx-vulkan/VKQueryPool.h + cocos/renderer/gfx-vulkan/VKRenderPass.cpp + cocos/renderer/gfx-vulkan/VKRenderPass.h + cocos/renderer/gfx-vulkan/VKShader.cpp + cocos/renderer/gfx-vulkan/VKShader.h + cocos/renderer/gfx-vulkan/VKStd.cpp + cocos/renderer/gfx-vulkan/VKStd.h + cocos/renderer/gfx-vulkan/VKSwapchain.cpp + cocos/renderer/gfx-vulkan/VKSwapchain.h + cocos/renderer/gfx-vulkan/VKTexture.cpp + cocos/renderer/gfx-vulkan/VKTexture.h + cocos/renderer/gfx-vulkan/VKUtils.cpp + cocos/renderer/gfx-vulkan/VKUtils.h + cocos/renderer/gfx-vulkan/volk.c + cocos/renderer/gfx-vulkan/volk.h + cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.cpp + cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.h + cocos/renderer/gfx-vulkan/states/VKSampler.cpp + cocos/renderer/gfx-vulkan/states/VKSampler.h + cocos/renderer/gfx-vulkan/states/VKTextureBarrier.cpp + cocos/renderer/gfx-vulkan/states/VKTextureBarrier.h + cocos/renderer/gfx-vulkan/states/VKBufferBarrier.cpp + cocos/renderer/gfx-vulkan/states/VKBufferBarrier.h + ) + + if(ANDROID) + set_source_files_properties( + ${CWD}/cocos/renderer/gfx-vulkan/VKDevice.cpp + PROPERTIES + # supress warning on Android + COMPILE_FLAGS -Wno-nullability-completeness + ) + endif() +endif() + +if(NX) + include(${CMAKE_CURRENT_LIST_DIR}/platform-nx/source.cmake) +endif() + +cocos_source_files( + cocos/renderer/frame-graph/Blackboard.h + cocos/renderer/frame-graph/CallbackPass.h + cocos/renderer/frame-graph/DevicePass.cpp + cocos/renderer/frame-graph/DevicePass.h + cocos/renderer/frame-graph/DevicePassResourceTable.cpp + cocos/renderer/frame-graph/DevicePassResourceTable.h + cocos/renderer/frame-graph/FrameGraph.cpp + cocos/renderer/frame-graph/FrameGraph.h + cocos/renderer/frame-graph/Handle.h + cocos/renderer/frame-graph/PassInsertPointManager.cpp + cocos/renderer/frame-graph/PassInsertPointManager.h + cocos/renderer/frame-graph/PassNode.cpp + cocos/renderer/frame-graph/PassNode.h + cocos/renderer/frame-graph/PassNodeBuilder.cpp + cocos/renderer/frame-graph/PassNodeBuilder.h + cocos/renderer/frame-graph/RenderTargetAttachment.h + cocos/renderer/frame-graph/Resource.h + cocos/renderer/frame-graph/ResourceAllocator.h + cocos/renderer/frame-graph/ResourceEntry.h + cocos/renderer/frame-graph/ResourceNode.h + cocos/renderer/frame-graph/VirtualResource.cpp + cocos/renderer/frame-graph/VirtualResource.h + cocos/renderer/frame-graph/ImmutableState.h + cocos/renderer/frame-graph/ImmutableState.cpp +) + +##### physics + +if(USE_PHYSICS_PHYSX) + cocos_source_files( + cocos/physics/PhysicsSDK.h + cocos/physics/PhysicsSelector.h + cocos/physics/sdk/World.h + cocos/physics/sdk/World.cpp + cocos/physics/sdk/Shape.h + cocos/physics/sdk/Shape.cpp + cocos/physics/sdk/RigidBody.h + cocos/physics/sdk/RigidBody.cpp + cocos/physics/sdk/Joint.h + cocos/physics/sdk/Joint.cpp + cocos/physics/spec/IBody.h + cocos/physics/spec/IJoint.h + cocos/physics/spec/ILifecycle.h + cocos/physics/spec/IShape.h + cocos/physics/spec/IWorld.h + cocos/physics/physx/PhysX.h + cocos/physics/physx/PhysXInc.h + cocos/physics/physx/PhysXUtils.h + cocos/physics/physx/PhysXUtils.cpp + cocos/physics/physx/PhysXWorld.h + cocos/physics/physx/PhysXWorld.cpp + cocos/physics/physx/PhysXFilterShader.h + cocos/physics/physx/PhysXFilterShader.cpp + cocos/physics/physx/PhysXEventManager.h + cocos/physics/physx/PhysXEventManager.cpp + cocos/physics/physx/PhysXSharedBody.h + cocos/physics/physx/PhysXSharedBody.cpp + cocos/physics/physx/PhysXRigidBody.h + cocos/physics/physx/PhysXRigidBody.cpp + cocos/physics/physx/shapes/PhysXShape.h + cocos/physics/physx/shapes/PhysXShape.cpp + cocos/physics/physx/shapes/PhysXSphere.h + cocos/physics/physx/shapes/PhysXSphere.cpp + cocos/physics/physx/shapes/PhysXBox.h + cocos/physics/physx/shapes/PhysXBox.cpp + cocos/physics/physx/shapes/PhysXPlane.h + cocos/physics/physx/shapes/PhysXPlane.cpp + cocos/physics/physx/shapes/PhysXCapsule.h + cocos/physics/physx/shapes/PhysXCapsule.cpp + cocos/physics/physx/shapes/PhysXCone.h + cocos/physics/physx/shapes/PhysXCone.cpp + cocos/physics/physx/shapes/PhysXCylinder.h + cocos/physics/physx/shapes/PhysXCylinder.cpp + cocos/physics/physx/shapes/PhysXTerrain.h + cocos/physics/physx/shapes/PhysXTerrain.cpp + cocos/physics/physx/shapes/PhysXTrimesh.h + cocos/physics/physx/shapes/PhysXTrimesh.cpp + cocos/physics/physx/joints/PhysXJoint.h + cocos/physics/physx/joints/PhysXJoint.cpp + cocos/physics/physx/joints/PhysXRevolute.h + cocos/physics/physx/joints/PhysXRevolute.cpp + cocos/physics/physx/joints/PhysXDistance.h + cocos/physics/physx/joints/PhysXDistance.cpp + ) + cocos_source_files( + cocos/bindings/auto/jsb_physics_auto.cpp + cocos/bindings/auto/jsb_physics_auto.h + ) +endif() + +##### 2d +cocos_source_files( + cocos/2d/renderer/Batcher2d.h + cocos/2d/renderer/Batcher2d.cpp + cocos/2d/renderer/UIModelProxy.h + cocos/2d/renderer/UIModelProxy.cpp + cocos/2d/renderer/RenderDrawInfo.h + cocos/2d/renderer/RenderDrawInfo.cpp + cocos/2d/renderer/UIMeshBuffer.h + cocos/2d/renderer/UIMeshBuffer.cpp + cocos/2d/renderer/RenderEntity.h + cocos/2d/renderer/RenderEntity.cpp + cocos/2d/renderer/StencilManager.h + cocos/2d/renderer/StencilManager.cpp +) + +##### 3d +cocos_source_files( + cocos/3d/assets/Types.h + cocos/3d/assets/Types.cpp + cocos/3d/assets/Mesh.h + cocos/3d/assets/Mesh.cpp + cocos/3d/assets/Morph.h + cocos/3d/assets/Morph.cpp + cocos/3d/assets/MorphRendering.h + cocos/3d/assets/MorphRendering.cpp + cocos/3d/assets/Skeleton.h + cocos/3d/assets/Skeleton.cpp + + cocos/3d/misc/CreateMesh.h + cocos/3d/misc/CreateMesh.cpp + cocos/3d/misc/BufferBlob.h + cocos/3d/misc/BufferBlob.cpp + cocos/3d/misc/Buffer.h + cocos/3d/misc/Buffer.cpp + + # cocos/3d/skeletal-animation/DataPoolManager.h + # cocos/3d/skeletal-animation/DataPoolManager.cpp + cocos/3d/skeletal-animation/SkeletalAnimationUtils.h + cocos/3d/skeletal-animation/SkeletalAnimationUtils.cpp +) + +##### core + +cocos_source_files( + cocos/core/Any.h + cocos/core/ArrayBuffer.h + + cocos/core/DataView.h + cocos/core/DataView.cpp + # cocos/core/Director.cpp + # cocos/core/Director.h + # cocos/core/Game.cpp + # cocos/core/Game.h + cocos/core/Root.cpp + cocos/core/Root.h + + cocos/core/System.h + + # cocos/core/Scheduler.cpp + # cocos/core/Scheduler.h + # cocos/core/SplashScreen.cpp + # cocos/core/SplashScreen.h + cocos/core/Types.h + cocos/core/Types.cpp + cocos/core/TypedArray.h + cocos/core/TypedArray.cpp + + # memop + cocos/core/memop/CachedArray.h + cocos/core/memop/Pool.h + cocos/core/memop/Pool.cpp + cocos/core/memop/RecyclePool.h + cocos/core/memop/RecyclePool.cpp + + + # cocos/core/asset-manager/AssetManager.cpp + # cocos/core/asset-manager/AssetManager.h + # cocos/core/asset-manager/AssetManagerModuleHeader.h + # cocos/core/asset-manager/Bundle.cpp + # cocos/core/asset-manager/Bundle.h + # cocos/core/asset-manager/Cache.cpp + # cocos/core/asset-manager/Cache.h + # cocos/core/asset-manager/CacheManager.cpp + # cocos/core/asset-manager/CacheManager.h + # cocos/core/asset-manager/AssetManagerConfig.cpp + # cocos/core/asset-manager/AssetManagerConfig.h + # cocos/core/asset-manager/DependMaps.cpp + # cocos/core/asset-manager/DependMaps.h + # cocos/core/asset-manager/DependUtil.cpp + # cocos/core/asset-manager/DependUtil.h + # cocos/core/asset-manager/Deserialize.cpp + # cocos/core/asset-manager/Deserialize.h + # cocos/core/asset-manager/DownloadFile.cpp + # cocos/core/asset-manager/DownloadFile.h + # cocos/core/asset-manager/DownloadImage.cpp + # cocos/core/asset-manager/DownloadImage.h + # cocos/core/asset-manager/DownloadScript.cpp + # cocos/core/asset-manager/DownloadScript.h + # cocos/core/asset-manager/Downloader.cpp + # cocos/core/asset-manager/Downloader.h + # cocos/core/asset-manager/Factory.cpp + # cocos/core/asset-manager/Factory.h + # cocos/core/asset-manager/Fetch.cpp + # cocos/core/asset-manager/Fetch.h + # cocos/core/asset-manager/Helper.cpp + # cocos/core/asset-manager/Helper.h + # cocos/core/asset-manager/Load.cpp + # cocos/core/asset-manager/Load.h + # cocos/core/asset-manager/PackManager.cpp + # cocos/core/asset-manager/PackManager.h + # cocos/core/asset-manager/Parser.cpp + # cocos/core/asset-manager/Parser.h + # cocos/core/asset-manager/Pipeline.cpp + # cocos/core/asset-manager/Pipeline.h + # cocos/core/asset-manager/PlistParser.cpp + # cocos/core/asset-manager/PlistParser.h + # cocos/core/asset-manager/PreProcess.cpp + # cocos/core/asset-manager/PreProcess.h + # cocos/core/asset-manager/ReleaseManager.cpp + # cocos/core/asset-manager/ReleaseManager.h + # cocos/core/asset-manager/RequestItem.cpp + # cocos/core/asset-manager/RequestItem.h + # cocos/core/asset-manager/Shared.cpp + # cocos/core/asset-manager/Shared.h + # cocos/core/asset-manager/Task.cpp + # cocos/core/asset-manager/Task.h + # cocos/core/asset-manager/UrlTransformer.cpp + # cocos/core/asset-manager/UrlTransformer.h + # cocos/core/asset-manager/Utilities.cpp + # cocos/core/asset-manager/Utilities.h + # cocos/core/asset-manager/WeakCache.cpp + # cocos/core/asset-manager/WeakCache.h + + cocos/core/assets/Asset.cpp + cocos/core/assets/Asset.h + cocos/core/assets/AssetEnum.cpp + cocos/core/assets/AssetEnum.h + cocos/core/assets/AssetsModuleHeader.h + cocos/core/assets/BufferAsset.cpp + cocos/core/assets/BufferAsset.h + cocos/core/assets/EffectAsset.cpp + cocos/core/assets/EffectAsset.h + cocos/core/assets/ImageAsset.cpp + cocos/core/assets/ImageAsset.h + # cocos/core/assets/JsonAsset.cpp + # cocos/core/assets/JsonAsset.h + cocos/core/assets/Material.cpp + cocos/core/assets/Material.h + # cocos/core/assets/Prefab.cpp + # cocos/core/assets/Prefab.h + cocos/core/assets/RenderTexture.cpp + cocos/core/assets/RenderTexture.h + cocos/core/assets/RenderingSubMesh.cpp + cocos/core/assets/RenderingSubMesh.h + cocos/core/assets/SceneAsset.cpp + cocos/core/assets/SceneAsset.h + cocos/core/assets/SimpleTexture.cpp + cocos/core/assets/SimpleTexture.h + cocos/core/assets/TextAsset.cpp + cocos/core/assets/TextAsset.h + cocos/core/assets/Texture2D.cpp + cocos/core/assets/Texture2D.h + cocos/core/assets/TextureBase.cpp + cocos/core/assets/TextureBase.h + cocos/core/assets/TextureCube.cpp + cocos/core/assets/TextureCube.h + cocos/core/assets/BitmapFont.h + cocos/core/assets/BitmapFont.cpp + cocos/core/assets/Font.h + cocos/core/assets/Font.cpp + + # builtin + cocos/core/builtin/BuiltinResMgr.cpp + cocos/core/builtin/BuiltinResMgr.h + # cocos/core/builtin/ShaderSourceAssembly.cpp + # cocos/core/builtin/ShaderSourceAssembly.h + # cocos/core/builtin/Effects.cpp # generated + # cocos/core/builtin/Effects.h + # cocos/core/builtin/shader-sources/glsl1.cpp # generated + # cocos/core/builtin/shader-sources/glsl1.h + # cocos/core/builtin/shader-sources/glsl3.cpp # generated + # cocos/core/builtin/shader-sources/glsl3.h + # cocos/core/builtin/shader-sources/glsl4.cpp # generated + # cocos/core/builtin/shader-sources/glsl4.h + # + + cocos/core/data/Object.cpp + cocos/core/data/Object.h + cocos/core/data/JSBNativeDataHolder.h + # cocos/core/data/deserializer/EffectAssetDeserializer.cpp + # cocos/core/data/deserializer/EffectAssetDeserializer.h + # cocos/core/data/deserializer/MeshDeserializer.cpp + # cocos/core/data/deserializer/MeshDeserializer.h + # cocos/core/data/deserializer/MaterialDeserializer.cpp + # cocos/core/data/deserializer/MaterialDeserializer.h + # cocos/core/data/deserializer/ImageAssetDeserializer.cpp + # cocos/core/data/deserializer/ImageAssetDeserializer.h + # cocos/core/data/deserializer/TextureBaseDeserializer.h + # cocos/core/data/deserializer/TextureBaseDeserializer.cpp + # cocos/core/data/deserializer/Texture2DDeserializer.cpp + # cocos/core/data/deserializer/Texture2DDeserializer.h + # cocos/core/data/deserializer/TerrainAssetDeserializer.cpp + # cocos/core/data/deserializer/TerrainAssetDeserializer.h + # cocos/core/data/deserializer/IAssetDeserializer.h + # cocos/core/data/deserializer/AssetDeserializerFactory.cpp + # cocos/core/data/deserializer/AssetDeserializerFactory.h + + cocos/core/event/CallbacksInvoker.cpp + cocos/core/event/CallbacksInvoker.h + cocos/core/event/EventTypesToJS.h + cocos/core/event/EventTypesToJS.cpp + # cocos/core/event/Event.cpp + # cocos/core/event/Event.h + # cocos/core/scene-graph/Find.cpp + # cocos/core/scene-graph/Find.h + cocos/core/scene-graph/Layers.h + cocos/core/scene-graph/Node.cpp + cocos/core/scene-graph/Node.h + cocos/core/scene-graph/BaseNode.h + # cocos/core/scene-graph/ComponentScheduler.h + # cocos/core/scene-graph/ComponentScheduler.cpp + # cocos/core/scene-graph/NodeActivator.cpp + # cocos/core/scene-graph/NodeActivator.h + cocos/core/scene-graph/NodeEnum.h + cocos/core/scene-graph/NodeEvent.cpp + cocos/core/scene-graph/NodeEvent.h + cocos/core/scene-graph/NodeEventProcessor.cpp + cocos/core/scene-graph/NodeEventProcessor.h + # cocos/core/scene-graph/NodeUIProperties.cpp + # cocos/core/scene-graph/NodeUIProperties.h + cocos/core/scene-graph/Scene.cpp + cocos/core/scene-graph/Scene.h + cocos/core/scene-graph/SceneGlobals.cpp + cocos/core/scene-graph/SceneGlobals.h + cocos/core/scene-graph/SceneGraphModuleHeader.h + + cocos/core/utils/IDGenerator.cpp + cocos/core/utils/IDGenerator.h + cocos/core/utils/Path.cpp + cocos/core/utils/Path.h + cocos/core/utils/MutableForwardIterator.cpp + cocos/core/utils/MutableForwardIterator.h + cocos/core/utils/Pool.h + cocos/core/utils/ImageUtils.h + cocos/core/utils/ImageUtils.cpp + + # cocos/core/platform/native/SystemInfo.h + # cocos/core/platform/native/SystemInfo.cpp + + cocos/core/platform/Debug.h + cocos/core/platform/Debug.cpp + cocos/core/platform/Macro.h + cocos/core/platform/Macro.cpp + # cocos/core/platform/Screen.h + # cocos/core/platform/Screen.cpp + # cocos/core/platform/View.h + # cocos/core/platform/View.cpp + # cocos/core/platform/VisibleRect.h + # cocos/core/platform/VisibleRect.cpp + +) + +# FreeTypeFont is used in DebugRenderer currently +if (USE_DEBUG_RENDERER) +cocos_source_files( + cocos/core/assets/FreeTypeFont.h + cocos/core/assets/FreeTypeFont.cpp +) +endif() + +cocos_source_files(MODULE ccgeometry + cocos/core/geometry/AABB.cpp + cocos/core/geometry/AABB.h + cocos/core/geometry/Capsule.cpp + cocos/core/geometry/Capsule.h + # cocos/core/geometry/Curve.cpp + # cocos/core/geometry/Curve.h + cocos/core/geometry/Distance.cpp + cocos/core/geometry/Distance.h + cocos/core/geometry/Enums.h + cocos/core/geometry/Frustum.cpp + cocos/core/geometry/Frustum.h + cocos/core/geometry/Intersect.cpp + cocos/core/geometry/Intersect.h + cocos/core/geometry/Line.cpp + cocos/core/geometry/Line.h + cocos/core/geometry/Obb.cpp + cocos/core/geometry/Obb.h + cocos/core/geometry/Plane.cpp + cocos/core/geometry/Plane.h + cocos/core/geometry/Ray.cpp + cocos/core/geometry/Ray.h + cocos/core/geometry/Spec.cpp + cocos/core/geometry/Spec.h + cocos/core/geometry/Sphere.cpp + cocos/core/geometry/Sphere.h + cocos/core/geometry/Spline.cpp + cocos/core/geometry/Spline.h + cocos/core/geometry/Triangle.cpp + cocos/core/geometry/Triangle.h +) + +##### script bindings + +######## utils +cocos_source_files( + cocos/bindings/utils/BindingUtils.cpp + cocos/bindings/utils/BindingUtils.h +) + +######## dop +cocos_source_files( + NO_UBUILD cocos/bindings/dop/BufferPool.cpp + cocos/bindings/dop/BufferPool.h + NO_UBUILD cocos/bindings/dop/jsb_dop.cpp + cocos/bindings/dop/jsb_dop.h + cocos/bindings/dop/PoolType.h + cocos/bindings/dop/BufferAllocator.h + NO_UBUILD cocos/bindings/dop/BufferAllocator.cpp +) + +######## auto +cocos_source_files( + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_cocos_auto.cpp + cocos/bindings/auto/jsb_cocos_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_extension_auto.cpp + cocos/bindings/auto/jsb_extension_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_gfx_auto.cpp + cocos/bindings/auto/jsb_gfx_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_network_auto.cpp + cocos/bindings/auto/jsb_network_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_pipeline_auto.cpp + cocos/bindings/auto/jsb_pipeline_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_scene_auto.cpp + cocos/bindings/auto/jsb_scene_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_assets_auto.cpp + cocos/bindings/auto/jsb_assets_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_geometry_auto.cpp + cocos/bindings/auto/jsb_geometry_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_render_auto.cpp + cocos/bindings/auto/jsb_render_auto.h + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_2d_auto.cpp + cocos/bindings/auto/jsb_2d_auto.h +) + +if(USE_AUDIO) + cocos_source_files( + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_audio_auto.cpp + cocos/bindings/auto/jsb_audio_auto.h + ) +endif() + +if(USE_VIDEO) + cocos_source_files( + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_video_auto.cpp + cocos/bindings/auto/jsb_video_auto.h + ) +endif() + +if(USE_WEBVIEW) + cocos_source_files( + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_webview_auto.cpp + cocos/bindings/auto/jsb_webview_auto.h + ) +endif() + +if(USE_XR) + cocos_source_files( + NO_WERROR cocos/bindings/auto/jsb_xr_auto.cpp + cocos/bindings/auto/jsb_xr_auto.h + ) +endif() + +if(USE_MIDDLEWARE) + cocos_source_files( + cocos/editor-support/IOBuffer.cpp + cocos/editor-support/IOBuffer.h + cocos/editor-support/IOTypedArray.cpp + cocos/editor-support/IOTypedArray.h + cocos/editor-support/MeshBuffer.cpp + cocos/editor-support/MeshBuffer.h + cocos/editor-support/middleware-adapter.cpp + cocos/editor-support/middleware-adapter.h + cocos/editor-support/MiddlewareMacro.h + cocos/editor-support/MiddlewareManager.cpp + cocos/editor-support/MiddlewareManager.h + cocos/editor-support/SharedBufferManager.cpp + cocos/editor-support/SharedBufferManager.h + cocos/editor-support/TypedArrayPool.cpp + cocos/editor-support/TypedArrayPool.h + ) + + cocos_source_files( + NO_WERROR NO_UBUILD cocos/bindings/auto/jsb_editor_support_auto.cpp + cocos/bindings/auto/jsb_editor_support_auto.h + ) + + if(USE_SPINE) + cocos_source_files( + NO_WERROR NO_UBUILD cocos/editor-support/spine/Animation.cpp + cocos/editor-support/spine/Animation.h + NO_WERROR NO_UBUILD cocos/editor-support/spine/AnimationState.cpp + cocos/editor-support/spine/AnimationState.h + NO_WERROR cocos/editor-support/spine/AnimationStateData.cpp + cocos/editor-support/spine/AnimationStateData.h + NO_WERROR cocos/editor-support/spine/Atlas.cpp + cocos/editor-support/spine/Atlas.h + NO_WERROR cocos/editor-support/spine/AtlasAttachmentLoader.cpp + cocos/editor-support/spine/AtlasAttachmentLoader.h + NO_WERROR cocos/editor-support/spine/Attachment.cpp + cocos/editor-support/spine/Attachment.h + NO_WERROR cocos/editor-support/spine/AttachmentLoader.cpp + cocos/editor-support/spine/AttachmentLoader.h + NO_WERROR cocos/editor-support/spine/AttachmentTimeline.cpp + cocos/editor-support/spine/AttachmentTimeline.h + cocos/editor-support/spine/AttachmentType.h + cocos/editor-support/spine/BlendMode.h + NO_WERROR cocos/editor-support/spine/Bone.cpp + cocos/editor-support/spine/Bone.h + NO_WERROR cocos/editor-support/spine/BoneData.cpp + cocos/editor-support/spine/BoneData.h + NO_WERROR cocos/editor-support/spine/BoundingBoxAttachment.cpp + cocos/editor-support/spine/BoundingBoxAttachment.h + NO_WERROR cocos/editor-support/spine/ClippingAttachment.cpp + cocos/editor-support/spine/ClippingAttachment.h + cocos/editor-support/spine/Color.h + NO_WERROR cocos/editor-support/spine/ColorTimeline.cpp + cocos/editor-support/spine/ColorTimeline.h + NO_WERROR cocos/editor-support/spine/Constraint.cpp + cocos/editor-support/spine/Constraint.h + NO_WERROR NO_UBUILD cocos/editor-support/spine/ConstraintData.cpp + cocos/editor-support/spine/ConstraintData.h + cocos/editor-support/spine/ContainerUtil.h + NO_WERROR cocos/editor-support/spine/CurveTimeline.cpp + cocos/editor-support/spine/CurveTimeline.h + cocos/editor-support/spine/Debug.h + NO_WERROR cocos/editor-support/spine/DeformTimeline.cpp + cocos/editor-support/spine/DeformTimeline.h + cocos/editor-support/spine/dll.h + NO_WERROR cocos/editor-support/spine/DrawOrderTimeline.cpp + cocos/editor-support/spine/DrawOrderTimeline.h + NO_WERROR cocos/editor-support/spine/Event.cpp + cocos/editor-support/spine/Event.h + NO_WERROR cocos/editor-support/spine/EventData.cpp + cocos/editor-support/spine/EventData.h + NO_WERROR cocos/editor-support/spine/EventTimeline.cpp + cocos/editor-support/spine/EventTimeline.h + NO_WERROR cocos/editor-support/spine/Extension.cpp + cocos/editor-support/spine/Extension.h + cocos/editor-support/spine/HashMap.h + cocos/editor-support/spine/HasRendererObject.h + NO_WERROR cocos/editor-support/spine/IkConstraint.cpp + cocos/editor-support/spine/IkConstraint.h + NO_WERROR cocos/editor-support/spine/IkConstraintData.cpp + cocos/editor-support/spine/IkConstraintData.h + NO_WERROR cocos/editor-support/spine/IkConstraintTimeline.cpp + cocos/editor-support/spine/IkConstraintTimeline.h + NO_WERROR cocos/editor-support/spine/Json.cpp + cocos/editor-support/spine/Json.h + NO_WERROR cocos/editor-support/spine/LinkedMesh.cpp + cocos/editor-support/spine/LinkedMesh.h + NO_WERROR cocos/editor-support/spine/MathUtil.cpp + cocos/editor-support/spine/MathUtil.h + NO_WERROR cocos/editor-support/spine/MeshAttachment.cpp + cocos/editor-support/spine/MeshAttachment.h + cocos/editor-support/spine/MixBlend.h + cocos/editor-support/spine/MixDirection.h + NO_WERROR cocos/editor-support/spine/PathAttachment.cpp + cocos/editor-support/spine/PathAttachment.h + NO_WERROR cocos/editor-support/spine/PathConstraint.cpp + cocos/editor-support/spine/PathConstraint.h + NO_WERROR cocos/editor-support/spine/PathConstraintData.cpp + cocos/editor-support/spine/PathConstraintData.h + NO_WERROR cocos/editor-support/spine/PathConstraintMixTimeline.cpp + cocos/editor-support/spine/PathConstraintMixTimeline.h + NO_WERROR cocos/editor-support/spine/PathConstraintPositionTimeline.cpp + cocos/editor-support/spine/PathConstraintPositionTimeline.h + NO_WERROR cocos/editor-support/spine/PathConstraintSpacingTimeline.cpp + cocos/editor-support/spine/PathConstraintSpacingTimeline.h + NO_WERROR cocos/editor-support/spine/PointAttachment.cpp + cocos/editor-support/spine/PointAttachment.h + cocos/editor-support/spine/Pool.h + cocos/editor-support/spine/PositionMode.h + NO_WERROR cocos/editor-support/spine/RegionAttachment.cpp + cocos/editor-support/spine/RegionAttachment.h + cocos/editor-support/spine/RotateMode.h + NO_WERROR cocos/editor-support/spine/RotateTimeline.cpp + cocos/editor-support/spine/RotateTimeline.h + NO_WERROR cocos/editor-support/spine/RTTI.cpp + cocos/editor-support/spine/RTTI.h + NO_WERROR cocos/editor-support/spine/ScaleTimeline.cpp + cocos/editor-support/spine/ScaleTimeline.h + NO_WERROR cocos/editor-support/spine/ShearTimeline.cpp + cocos/editor-support/spine/ShearTimeline.h + NO_WERROR cocos/editor-support/spine/Skeleton.cpp + cocos/editor-support/spine/Skeleton.h + NO_WERROR cocos/editor-support/spine/SkeletonBinary.cpp + cocos/editor-support/spine/SkeletonBinary.h + NO_WERROR cocos/editor-support/spine/SkeletonBounds.cpp + cocos/editor-support/spine/SkeletonBounds.h + NO_WERROR cocos/editor-support/spine/SkeletonClipping.cpp + cocos/editor-support/spine/SkeletonClipping.h + NO_WERROR cocos/editor-support/spine/SkeletonData.cpp + cocos/editor-support/spine/SkeletonData.h + NO_WERROR cocos/editor-support/spine/SkeletonJson.cpp + cocos/editor-support/spine/SkeletonJson.h + NO_WERROR cocos/editor-support/spine/Skin.cpp + cocos/editor-support/spine/Skin.h + NO_WERROR cocos/editor-support/spine/Slot.cpp + cocos/editor-support/spine/Slot.h + NO_WERROR cocos/editor-support/spine/SlotData.cpp + cocos/editor-support/spine/SlotData.h + cocos/editor-support/spine/SpacingMode.h + cocos/editor-support/spine/spine.h + NO_WERROR cocos/editor-support/spine/SpineObject.cpp + cocos/editor-support/spine/SpineObject.h + cocos/editor-support/spine/SpineString.h + NO_WERROR cocos/editor-support/spine/TextureLoader.cpp + cocos/editor-support/spine/TextureLoader.h + NO_WERROR cocos/editor-support/spine/Timeline.cpp + cocos/editor-support/spine/Timeline.h + cocos/editor-support/spine/TimelineType.h + NO_WERROR cocos/editor-support/spine/TransformConstraint.cpp + cocos/editor-support/spine/TransformConstraint.h + NO_WERROR cocos/editor-support/spine/TransformConstraintData.cpp + cocos/editor-support/spine/TransformConstraintData.h + NO_WERROR cocos/editor-support/spine/TransformConstraintTimeline.cpp + cocos/editor-support/spine/TransformConstraintTimeline.h + cocos/editor-support/spine/TransformMode.h + NO_WERROR cocos/editor-support/spine/TranslateTimeline.cpp + cocos/editor-support/spine/TranslateTimeline.h + NO_WERROR cocos/editor-support/spine/Triangulator.cpp + cocos/editor-support/spine/Triangulator.h + NO_WERROR cocos/editor-support/spine/TwoColorTimeline.cpp + cocos/editor-support/spine/TwoColorTimeline.h + NO_WERROR cocos/editor-support/spine/Updatable.cpp + cocos/editor-support/spine/Updatable.h + cocos/editor-support/spine/Vector.h + NO_WERROR cocos/editor-support/spine/VertexAttachment.cpp + cocos/editor-support/spine/VertexAttachment.h + NO_WERROR cocos/editor-support/spine/VertexEffect.cpp + cocos/editor-support/spine/VertexEffect.h + cocos/editor-support/spine/Vertices.h + NO_WERROR cocos/editor-support/spine-creator-support/AttachmentVertices.cpp + cocos/editor-support/spine-creator-support/AttachmentVertices.h + NO_WERROR cocos/editor-support/spine-creator-support/SkeletonAnimation.cpp + cocos/editor-support/spine-creator-support/SkeletonAnimation.h + NO_WERROR cocos/editor-support/spine-creator-support/SkeletonCache.cpp + cocos/editor-support/spine-creator-support/SkeletonCache.h + NO_WERROR cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp + cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.h + NO_WERROR cocos/editor-support/spine-creator-support/SkeletonCacheMgr.cpp + cocos/editor-support/spine-creator-support/SkeletonCacheMgr.h + NO_WERROR cocos/editor-support/spine-creator-support/SkeletonDataMgr.cpp + cocos/editor-support/spine-creator-support/SkeletonDataMgr.h + NO_WERROR NO_UBUILD cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp + cocos/editor-support/spine-creator-support/SkeletonRenderer.h + NO_WERROR cocos/editor-support/spine-creator-support/spine-cocos2dx.cpp + cocos/editor-support/spine-creator-support/spine-cocos2dx.h + NO_WERROR cocos/editor-support/spine-creator-support/VertexEffectDelegate.cpp + cocos/editor-support/spine-creator-support/VertexEffectDelegate.h + + ) + cocos_source_files( + NO_WERROR cocos/bindings/auto/jsb_spine_auto.cpp + cocos/bindings/auto/jsb_spine_auto.h + NO_WERROR cocos/bindings/manual/jsb_spine_manual.cpp + cocos/bindings/manual/jsb_spine_manual.h + ) + endif() + + if(USE_DRAGONBONES) + cocos_source_files( + cocos/editor-support/dragonbones/DragonBonesHeaders.h + NO_WERROR cocos/editor-support/dragonbones/animation/Animation.cpp + cocos/editor-support/dragonbones/animation/Animation.h + NO_WERROR cocos/editor-support/dragonbones/animation/AnimationState.cpp + cocos/editor-support/dragonbones/animation/AnimationState.h + NO_WERROR cocos/editor-support/dragonbones/animation/BaseTimelineState.cpp + cocos/editor-support/dragonbones/animation/BaseTimelineState.h + cocos/editor-support/dragonbones/animation/IAnimatable.h + NO_WERROR cocos/editor-support/dragonbones/animation/TimelineState.cpp + cocos/editor-support/dragonbones/animation/TimelineState.h + NO_WERROR cocos/editor-support/dragonbones/animation/WorldClock.cpp + cocos/editor-support/dragonbones/animation/WorldClock.h + NO_WERROR cocos/editor-support/dragonbones/armature/Armature.cpp + cocos/editor-support/dragonbones/armature/Armature.h + NO_WERROR cocos/editor-support/dragonbones/armature/Bone.cpp + cocos/editor-support/dragonbones/armature/Bone.h + NO_WERROR cocos/editor-support/dragonbones/armature/Constraint.cpp + cocos/editor-support/dragonbones/armature/Constraint.h + NO_WERROR cocos/editor-support/dragonbones/armature/DeformVertices.cpp + cocos/editor-support/dragonbones/armature/DeformVertices.h + cocos/editor-support/dragonbones/armature/IArmatureProxy.h + NO_WERROR cocos/editor-support/dragonbones/armature/Slot.cpp + cocos/editor-support/dragonbones/armature/Slot.h + NO_WERROR cocos/editor-support/dragonbones/armature/TransformObject.cpp + cocos/editor-support/dragonbones/armature/TransformObject.h + NO_WERROR cocos/editor-support/dragonbones/core/BaseObject.cpp + cocos/editor-support/dragonbones/core/BaseObject.h + NO_WERROR cocos/editor-support/dragonbones/core/DragonBones.cpp + cocos/editor-support/dragonbones/core/DragonBones.h + NO_WERROR cocos/editor-support/dragonbones/event/EventObject.cpp + cocos/editor-support/dragonbones/event/EventObject.h + cocos/editor-support/dragonbones/event/IEventDispatcher.h + NO_WERROR cocos/editor-support/dragonbones/factory/BaseFactory.cpp + cocos/editor-support/dragonbones/factory/BaseFactory.h + cocos/editor-support/dragonbones/geom/ColorTransform.h + cocos/editor-support/dragonbones/geom/Matrix.h + NO_WERROR cocos/editor-support/dragonbones/geom/Point.cpp + cocos/editor-support/dragonbones/geom/Point.h + cocos/editor-support/dragonbones/geom/Rectangle.h + NO_WERROR cocos/editor-support/dragonbones/geom/Transform.cpp + cocos/editor-support/dragonbones/geom/Transform.h + NO_WERROR cocos/editor-support/dragonbones/model/AnimationConfig.cpp + cocos/editor-support/dragonbones/model/AnimationConfig.h + NO_WERROR cocos/editor-support/dragonbones/model/AnimationData.cpp + cocos/editor-support/dragonbones/model/AnimationData.h + NO_WERROR cocos/editor-support/dragonbones/model/ArmatureData.cpp + cocos/editor-support/dragonbones/model/ArmatureData.h + NO_WERROR cocos/editor-support/dragonbones/model/BoundingBoxData.cpp + cocos/editor-support/dragonbones/model/BoundingBoxData.h + NO_WERROR cocos/editor-support/dragonbones/model/CanvasData.cpp + cocos/editor-support/dragonbones/model/CanvasData.h + NO_WERROR cocos/editor-support/dragonbones/model/ConstraintData.cpp + cocos/editor-support/dragonbones/model/ConstraintData.h + NO_WERROR cocos/editor-support/dragonbones/model/DisplayData.cpp + cocos/editor-support/dragonbones/model/DisplayData.h + NO_WERROR cocos/editor-support/dragonbones/model/DragonBonesData.cpp + cocos/editor-support/dragonbones/model/DragonBonesData.h + NO_WERROR cocos/editor-support/dragonbones/model/SkinData.cpp + cocos/editor-support/dragonbones/model/SkinData.h + NO_WERROR cocos/editor-support/dragonbones/model/TextureAtlasData.cpp + cocos/editor-support/dragonbones/model/TextureAtlasData.h + NO_WERROR cocos/editor-support/dragonbones/model/UserData.cpp + cocos/editor-support/dragonbones/model/UserData.h + NO_WERROR cocos/editor-support/dragonbones/parser/BinaryDataParser.cpp + cocos/editor-support/dragonbones/parser/BinaryDataParser.h + NO_WERROR cocos/editor-support/dragonbones/parser/DataParser.cpp + cocos/editor-support/dragonbones/parser/DataParser.h + NO_WERROR NO_UBUILD cocos/editor-support/dragonbones/parser/JSONDataParser.cpp + cocos/editor-support/dragonbones/parser/JSONDataParser.h + NO_WERROR cocos/editor-support/dragonbones-creator-support/ArmatureCache.cpp + cocos/editor-support/dragonbones-creator-support/ArmatureCache.h + NO_WERROR cocos/editor-support/dragonbones-creator-support/ArmatureCacheMgr.cpp + cocos/editor-support/dragonbones-creator-support/ArmatureCacheMgr.h + NO_WERROR cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp + cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.h + NO_WERROR NO_UBUILD cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp + cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.h + cocos/editor-support/dragonbones-creator-support/CCDragonBonesHeaders.h + NO_WERROR cocos/editor-support/dragonbones-creator-support/CCFactory.cpp + cocos/editor-support/dragonbones-creator-support/CCFactory.h + NO_WERROR cocos/editor-support/dragonbones-creator-support/CCSlot.cpp + cocos/editor-support/dragonbones-creator-support/CCSlot.h + NO_WERROR cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.cpp + cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.h + + ) + cocos_source_files( + NO_WERROR cocos/bindings/auto/jsb_dragonbones_auto.cpp + cocos/bindings/auto/jsb_dragonbones_auto.h + NO_WERROR cocos/bindings/manual/jsb_dragonbones_manual.cpp + cocos/bindings/manual/jsb_dragonbones_manual.h + ) + endif() +endif() + +######## manual +cocos_source_files( + cocos/bindings/manual/jsb_classtype.cpp + cocos/bindings/manual/jsb_classtype.h + cocos/bindings/manual/jsb_cocos_manual.cpp + cocos/bindings/manual/jsb_cocos_manual.h + cocos/bindings/manual/jsb_conversions.h + cocos/bindings/manual/jsb_conversions_spec.cpp + cocos/bindings/manual/jsb_conversions_spec.h + cocos/bindings/manual/jsb_gfx_manual.cpp + cocos/bindings/manual/jsb_gfx_manual.h + cocos/bindings/manual/jsb_global.cpp + cocos/bindings/manual/jsb_global.h + cocos/bindings/manual/jsb_helper.cpp + cocos/bindings/manual/jsb_helper.h + cocos/bindings/manual/jsb_module_register.h + cocos/bindings/manual/jsb_module_register.cpp + cocos/bindings/manual/jsb_platform.h + cocos/bindings/manual/jsb_scene_manual.cpp + cocos/bindings/manual/jsb_scene_manual.h + cocos/bindings/manual/jsb_assets_manual.cpp + cocos/bindings/manual/jsb_assets_manual.h + cocos/bindings/manual/jsb_network_manual.cpp + cocos/bindings/manual/jsb_network_manual.h + cocos/bindings/manual/jsb_xmlhttprequest.cpp + cocos/bindings/manual/jsb_xmlhttprequest.h + cocos/bindings/manual/jsb_pipeline_manual.h + cocos/bindings/manual/jsb_pipeline_manual.cpp +) +if(USE_AUDIO) + cocos_source_files( + cocos/bindings/manual/jsb_audio_manual.cpp + cocos/bindings/manual/jsb_audio_manual.h + ) +endif() +if(USE_SOCKET) + cocos_source_files( + cocos/bindings/manual/jsb_socketio.cpp + cocos/bindings/manual/jsb_socketio.h + cocos/bindings/manual/jsb_websocket.cpp + cocos/bindings/manual/jsb_websocket.h + ) +endif() + +if(NOT IOS AND USE_WEBSOCKET_SERVER) + cocos_source_files( + cocos/bindings/manual/jsb_websocket_server.cpp + cocos/bindings/manual/jsb_websocket_server.h + ) +endif() + +if(ANDROID) + cocos_source_files( + cocos/bindings/manual/jsb_platform_android.cpp + cocos/bindings/manual/JavaScriptJavaBridge.cpp + cocos/bindings/manual/JavaScriptJavaBridge.h + ) +elseif(OHOS) + cocos_source_files( + cocos/bindings/manual/jsb_platform_ohos.cpp + cocos/bindings/manual/JavaScriptJavaBridge.cpp + cocos/bindings/manual/JavaScriptJavaBridge.h + ) +elseif(APPLE) + cocos_source_files( + cocos/bindings/manual/jsb_platform_apple.mm + cocos/bindings/manual/JavaScriptObjCBridge.h + cocos/bindings/manual/JavaScriptObjCBridge.mm + cocos/platform/apple/JsbBridge.h + cocos/platform/apple/JsbBridge.mm + cocos/platform/apple/JsbBridgeWrapper.h + cocos/platform/apple/JsbBridgeWrapper.mm + ) +elseif(WIN32) + cocos_source_files( + NO_WERROR cocos/bindings/manual/jsb_platform_win32.cpp + ) +elseif(LINUX) + cocos_source_files( + NO_WERROR cocos/bindings/manual/jsb_platform_linux.cpp + ) +endif() + +############# module bindings +cocos_source_files(MODULE ccbindings + cocos/bindings/sebind/intl/common.h + cocos/bindings/sebind/intl/common.cpp + cocos/bindings/sebind/class.inl + cocos/bindings/sebind/sebind.h +) + +if(USE_SE_V8) + cocos_source_files(MODULE ccbindings + cocos/bindings/sebind/class_v8.h + cocos/bindings/sebind/class_v8.cpp + cocos/bindings/jswrapper/v8/Base.h + cocos/bindings/jswrapper/v8/Class.cpp + cocos/bindings/jswrapper/v8/Class.h + cocos/bindings/jswrapper/v8/HelperMacros.h + cocos/bindings/jswrapper/v8/HelperMacros.cpp + cocos/bindings/jswrapper/v8/Object.cpp + cocos/bindings/jswrapper/v8/Object.h + cocos/bindings/jswrapper/v8/ObjectWrap.cpp + cocos/bindings/jswrapper/v8/ObjectWrap.h + cocos/bindings/jswrapper/v8/ScriptEngine.cpp + cocos/bindings/jswrapper/v8/ScriptEngine.h + cocos/bindings/jswrapper/v8/SeApi.h + cocos/bindings/jswrapper/v8/Utils.cpp + cocos/bindings/jswrapper/v8/Utils.h + cocos/bindings/jswrapper/v8/MissingSymbols.cpp + cocos/bindings/jswrapper/v8/MissingSymbols.h + ) + if(USE_V8_DEBUGGER) + cocos_source_files(MODULE ccbindings + cocos/bindings/jswrapper/v8/debugger/base64.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/env.cpp + cocos/bindings/jswrapper/v8/debugger/env.h + NO_WERROR NO_UBUILD cocos/bindings/jswrapper/v8/debugger/http_parser.cpp + cocos/bindings/jswrapper/v8/debugger/http_parser.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/inspector_agent.cpp + cocos/bindings/jswrapper/v8/debugger/inspector_agent.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/inspector_io.cpp + cocos/bindings/jswrapper/v8/debugger/inspector_io.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/inspector_socket.cpp + cocos/bindings/jswrapper/v8/debugger/inspector_socket.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/inspector_socket_server.cpp + cocos/bindings/jswrapper/v8/debugger/inspector_socket_server.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/node.cpp + cocos/bindings/jswrapper/v8/debugger/node.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/node_debug_options.cpp + cocos/bindings/jswrapper/v8/debugger/node_debug_options.h + cocos/bindings/jswrapper/v8/debugger/node_mutex.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/SHA1.cpp + cocos/bindings/jswrapper/v8/debugger/SHA1.h + cocos/bindings/jswrapper/v8/debugger/util-inl.h + NO_WERROR cocos/bindings/jswrapper/v8/debugger/util.cpp + cocos/bindings/jswrapper/v8/debugger/util.h + cocos/bindings/jswrapper/v8/debugger/v8_inspector_protocol_json.h + ) + endif() +endif() + +if(USE_SE_SM) + cocos_source_files(MODULE ccbindings + cocos/bindings/jswrapper/sm/Base.h + NO_WERROR cocos/bindings/jswrapper/sm/Class.cpp + cocos/bindings/jswrapper/sm/Class.h + cocos/bindings/jswrapper/sm/HelperMacros.h + NO_WERROR cocos/bindings/jswrapper/sm/HelperMacros.cpp + NO_WERROR cocos/bindings/jswrapper/sm/Object.cpp + cocos/bindings/jswrapper/sm/Object.h + NO_WERROR cocos/bindings/jswrapper/sm/ScriptEngine.cpp + cocos/bindings/jswrapper/sm/ScriptEngine.h + cocos/bindings/jswrapper/sm/SeApi.h + NO_WERROR cocos/bindings/jswrapper/sm/Utils.cpp + cocos/bindings/jswrapper/sm/Utils.h + ) +endif() + +cocos_source_files(MODULE ccbindings + cocos/bindings/jswrapper/config.h + cocos/bindings/jswrapper/config.cpp + cocos/bindings/jswrapper/HandleObject.cpp + cocos/bindings/jswrapper/HandleObject.h + cocos/bindings/jswrapper/MappingUtils.cpp + cocos/bindings/jswrapper/MappingUtils.h + cocos/bindings/jswrapper/Object.h + cocos/bindings/jswrapper/RefCounter.cpp + cocos/bindings/jswrapper/RefCounter.h + cocos/bindings/jswrapper/SeApi.h + cocos/bindings/jswrapper/State.cpp + cocos/bindings/jswrapper/State.h + cocos/bindings/jswrapper/PrivateObject.h + cocos/bindings/jswrapper/Value.cpp + cocos/bindings/jswrapper/Value.h + cocos/bindings/jswrapper/ValueArrayPool.cpp + cocos/bindings/jswrapper/ValueArrayPool.h +) + +cocos_source_files( + cocos/bindings/manual/jsb_global_init.cpp + cocos/bindings/manual/jsb_global_init.h +) + +cocos_source_files( + cocos/bindings/event/CustomEventTypes.h + cocos/bindings/event/EventDispatcher.cpp + cocos/bindings/event/EventDispatcher.h +) + +#### storage +if(NOT ANDROID) + cocos_source_files( + cocos/storage/local-storage/LocalStorage.cpp + cocos/storage/local-storage/LocalStorage.h + ) +else() + cocos_source_files( + cocos/storage/local-storage/LocalStorage-android.cpp + ) +endif() + +#### ui +if(USE_EDIT_BOX) + cocos_source_files( + cocos/ui/edit-box/EditBox.h + ) +endif() + +if(ANDROID OR IOS OR OHOS) + if(USE_VIDEO) + cocos_source_files( + cocos/ui/videoplayer/VideoPlayer.h + ) + endif() + if(USE_WEBVIEW) + cocos_source_files( + cocos/ui/webview/WebView-inl.h + cocos/ui/webview/WebView.h + ) + endif() +endif() + +if(ANDROID) + if(USE_EDIT_BOX) + cocos_source_files( + cocos/ui/edit-box/EditBox-android.cpp + ) + endif() + if(USE_VIDEO) + cocos_source_files( + cocos/ui/videoplayer/VideoPlayer-java.cpp + ) + endif() + if(USE_WEBVIEW) + cocos_source_files( + cocos/ui/webview/WebViewImpl-java.h + cocos/ui/webview/WebViewImpl-android.cpp + ) + endif() +elseif(OHOS) + if(USE_EDIT_BOX) + cocos_source_files( + cocos/ui/edit-box/EditBox-ohos.cpp + ) + endif() + if(USE_VIDEO) + cocos_source_files( + cocos/ui/videoplayer/VideoPlayer-java.cpp + ) + endif() + if(USE_WEBVIEW) + cocos_source_files( + cocos/ui/webview/WebViewImpl-java.h + cocos/ui/webview/WebViewImpl-ohos.cpp + ) + endif() +elseif(MACOSX) + if(USE_EDIT_BOX) + cocos_source_files( + cocos/ui/edit-box/EditBox-mac.mm + ) + endif() +elseif(IOS) + if(USE_EDIT_BOX) + cocos_source_files( + NO_WERROR NO_UBUILD cocos/ui/edit-box/EditBox-ios.mm + ) + endif() + if(USE_VIDEO) + cocos_source_files( + cocos/ui/videoplayer/VideoPlayer-ios.mm + ) + endif() + if(USE_WEBVIEW) + cocos_source_files( + cocos/ui/webview/WebViewImpl-ios.h + NO_WERROR NO_UBUILD cocos/ui/webview/WebViewImpl-ios.mm + + ) + endif() +elseif(WIN32) + if(USE_EDIT_BOX) + cocos_source_files( + NO_WERROR cocos/ui/edit-box/EditBox-win32.cpp + ) + endif() +elseif(LINUX OR QNX) + if(USE_EDIT_BOX) + cocos_source_files( + NO_WERROR cocos/ui/edit-box/EditBox-linux.cpp + ) + endif() +endif() + +##### extensions + +cocos_source_files( + extensions/assets-manager/AssetsManagerEx.cpp + extensions/assets-manager/AssetsManagerEx.h + extensions/assets-manager/AsyncTaskPool.cpp + extensions/assets-manager/AsyncTaskPool.h + extensions/assets-manager/EventAssetsManagerEx.cpp + extensions/assets-manager/EventAssetsManagerEx.h + extensions/assets-manager/Manifest.cpp + extensions/assets-manager/Manifest.h + extensions/cocos-ext.h + extensions/ExtensionExport.h + extensions/ExtensionMacros.h +) + +list(APPEND COCOS_SOURCE_LIST ${CC_EXTERNAL_SOURCES}) + +### generate source files + +set(CC_GENERATED_FILES + ${CWD}/cocos/core/builtin/DebugInfos.cpp +) + +add_custom_target(builtin-res + COMMAND ${CMAKE_COMMAND} -E echo "Generate builtin resources ..." + COMMAND ${NODE_EXECUTABLE} ${CWD}/cmake/scripts/gen_debugInfos.js + ${CWD}/../EngineErrorMap.md + ${CWD}/cocos/core/builtin/DebugInfos.cpp.in + ${CWD}/cocos/core/builtin/DebugInfos.cpp + DEPENDS + ${CWD}/cocos/core/builtin/DebugInfos.cpp.in + VERBATIM USES_TERMINAL +) +set_target_properties(builtin-res PROPERTIES FOLDER Utils) + + +list(APPEND COCOS_SOURCE_LIST ${CC_GENERATED_FILES}) + +if(USE_MODULES) + add_library(ccmath ${ccmath_SOURCE_LIST}) + add_library(cclog ${cclog_SOURCE_LIST}) + add_library(ccfilesystem ${ccfilesystem_SOURCE_LIST} ${CC_TINYDIR_SOURCES}) + add_library(ccutils ${ccutils_SOURCE_LIST} ${CC_UTILS_SOURCES}) + add_library(ccunzip ${ccunzip_SOURCE_LIST} ${CC_UNZIP_SOURCES}) + add_library(ccbindings ${ccbindings_SOURCE_LIST}) + add_library(ccgeometry ${ccgeometry_SOURCE_LIST}) + + target_include_directories(ccmath PRIVATE + ${CWD}/cocos + ) + target_include_directories(ccgeometry PRIVATE + ${CWD}/cocos + ) + target_include_directories(ccunzip PRIVATE + ${CWD}/external/sources/unzip + ${CWD}/external/sources + ${CWD}/cocos + ) + target_include_directories(cclog PRIVATE + ${CWD}/cocos + ) + target_include_directories(ccfilesystem PRIVATE + ${CWD} + ${CWD}/cocos + ${CWD}/external/sources + ) + target_include_directories(ccutils PRIVATE + ${CWD}/cocos + ${CWD}/external/sources + ) + target_include_directories(ccbindings PRIVATE + ${CWD}/cocos + ${CWD}/cocos/bindings/jswrapper + ${CWD}/cocos/editor-support # TODO: refactor include path + ${CWD} + ${CC_EXTERNAL_INCLUDES} + ) + target_link_libraries(ccunzip PUBLIC + ${ZLIB} + ) + target_link_libraries(ccfilesystem PUBLIC + ccunzip + ccutils + cclog + ) + target_link_libraries(ccbindings PUBLIC + ccfilesystem + cclog + ${se_libs_name} + uv + ) + target_link_libraries(ccgeometry PUBLIC + ccmath + ) + if(ANDROID) + target_link_libraries(ccmath PUBLIC + android_platform + ) + target_link_libraries(cclog PUBLIC + log + ) + target_link_libraries(ccfilesystem PUBLIC + cocos_jni + ) + elseif(OHOS) + target_link_libraries(cclog PUBLIC + hilog_ndk.z + ) + target_link_libraries(ccfilesystem PUBLIC + cocos_jni + rawfile.z + ) + elseif(APPLE) + target_link_libraries(ccfilesystem PUBLIC + "-framework Foundation" + "-framework SystemConfiguration" + ) + endif() +else() + list(APPEND COCOS_SOURCE_LIST + ${ccmath_SOURCE_LIST} + ${ccgeometry_SOURCE_LIST} + ${cclog_SOURCE_LIST} + ${ccfilesystem_SOURCE_LIST} + ${ccunzip_SOURCE_LIST} + ${ccbindings_SOURCE_LIST} + ${ccutils_SOURCE_LIST} + ${CC_UNZIP_SOURCES} + ${CC_TINYDIR_SOURCES} + ) +endif() + + +if(QNX) + include(${QNX_PATH}/source.cmake) + qnx_source_list(ccqnx_SOURCE_LIST ${QNX_PATH}) + source_group(TREE ${QNX_PATH} PREFIX "Source Files" FILES ${ccqnx_SOURCE_LIST}}) + list(APPEND COCOS_SOURCE_LIST ${ccqnx_SOURCE_LIST}) +endif() + +if(DEFINED COCOS_SOURCE_PLUGIN_EXCULDE) + list(REMOVE_ITEM COCOS_SOURCE_LIST ${COCOS_SOURCE_PLUGIN_EXCULDE}) +endif() + +if(DEFINED COCOS_SOURCE_PLUGIN_LIST) + list(APPEND COCOS_SOURCE_LIST ${COCOS_SOURCE_PLUGIN_LIST}) +endif() + +add_library(${ENGINE_NAME} ${COCOS_SOURCE_LIST}) + +if(USE_MODULES) + target_link_libraries(${ENGINE_NAME} PUBLIC + ccmath + cclog + ccfilesystem + ccunzip + ccbindings + ccutils + ) +endif() + + +if(ANDROID OR OHOS) + cc_enable_werror("${CC_JNI_SRC_FILES}") + add_library(cocos_jni STATIC ${CC_JNI_SRC_FILES}) + target_include_directories(cocos_jni PUBLIC + ${CWD} + ${CWD}/cocos + ${CC_EXTERNAL_INCLUDES} + ) + if(ANDROID) + target_link_libraries(cocos_jni PUBLIC + android_platform + android + log + ) + # Export GameActivity_onCreate(), + # Refer to: https://github.com/android-ndk/ndk/issues/381. + set(CMAKE_SHARED_LINKER_FLAGS + "${CMAKE_SHARED_LINKER_FLAGS} -u GameActivity_onCreate") + endif() +endif() + +################################# cc_apply_definations ################################### +function(cc_apply_definations target) + target_compile_definitions(${target} PUBLIC + $,CC_USE_VIDEO=1,CC_USE_VIDEO=0> + $,CC_USE_WEBVIEW=1,CC_USE_WEBVIEW=0> + $,CC_USE_AUDIO=1,CC_USE_AUDIO=0> + $,CC_USE_XR=1,CC_USE_XR=0> + $,CC_USE_SOCKET=1,CC_USE_SOCKET=0> + $,CC_USE_WEBSOCKET_SERVER=1,CC_USE_WEBSOCKET_SERVER=0> + $,CC_USE_EDITBOX=1,CC_USE_EDITBOX=0> + # USE_V8_DEBUGGER = USE_V8_DEBUGGER && (in_debug_mode OR USE_V8_DEBUGGER_FORCEON) + $,$>,$>,USE_V8_DEBUGGER=1,USE_V8_DEBUGGER=0> + $,CC_USE_MIDDLEWARE=1,CC_USE_MIDDLEWARE=0> + $,CC_USE_SPINE=1,CC_USE_SPINE=0> + $,CC_USE_DRAGONBONES=1,CC_USE_DRAGONBONES=0> + $,CC_USE_JOB_SYSTEM_TBB=1,CC_USE_JOB_SYSTEM_TBB=0> + $,CC_USE_JOB_SYSTEM_TASKFLOW=1,CC_USE_JOB_SYSTEM_TASKFLOW=0> + $,CC_USE_PHYSICS_PHYSX=1,CC_USE_PHYSICS_PHYSX=0> + $,CC_USE_OCCLUSION_QUERY=1,CC_USE_OCCLUSION_QUERY=0> + $,CC_USE_DEBUG_RENDERER=1,CC_USE_DEBUG_RENDERER=0> + $,CC_USE_GEOMETRY_RENDERER=1,CC_USE_GEOMETRY_RENDERER=0> + $,CC_USE_WEBP=1,CC_USE_WEBP=0> + $,CC_EDITOR=1,CC_EDITOR=0> + $<$:CC_REMOTE_LOG=1> + $<$:SCRIPT_ENGINE_TYPE=1> + $<$,$>:CC_DEBUG=1> + ) +endfunction() + +# setup default flags +cc_apply_definations(${ENGINE_NAME}) + +if(USE_MODULES) + cc_apply_definations(ccmath) + cc_apply_definations(cclog) + cc_apply_definations(ccfilesystem) + cc_apply_definations(ccunzip) + cc_apply_definations(ccbindings) + cc_apply_definations(ccutils) +endif() + +if(USE_XR) + cc_xr_apply_definations(${ENGINE_NAME}) + if(USE_MODULES) + cc_xr_apply_definations(ccmath) + cc_xr_apply_definations(cclog) + cc_xr_apply_definations(ccfilesystem) + cc_xr_apply_definations(ccunzip) + cc_xr_apply_definations(ccbindings) + cc_xr_apply_definations(ccutils) + endif() +endif() + +if(MSVC) + set(V8_DIR + ${CWD}/external/win64/libs/v8 + ) + file(GLOB V8_DLLS + ${CWD}/external/win64/libs/v8/Release/*.dll + ) + + file(GLOB WINDOWS_DLLS + ${CWD}/external/win64/libs/*.dll + ${CWD}/external/win64/libs/msvcr/*.dll + ) + target_compile_options(${ENGINE_NAME} PUBLIC /MP + /bigobj + /wd4018 # signed/unsigned mismatch + /wd4244 # type conversion data lost + /wd4267 # conversion from 'size_t' to 'type', possible loss of data + /wd4305 # truncation from 'type1' to 'type2' + /wd4309 # truncation of constant value + /wd4819 # file contains a character that cannot be represented in the current code page + /wd4996 # deprecated + ) +endif() + +if(CC_USE_VULKAN) + + target_compile_definitions(${ENGINE_NAME} PUBLIC VK_NO_PROTOTYPES) + target_compile_definitions(${ENGINE_NAME} PUBLIC CC_USE_VULKAN) + + if(WIN32) + target_compile_definitions(${ENGINE_NAME} PUBLIC VK_USE_PLATFORM_WIN32_KHR) + elseif(NX) + target_compile_definitions(${ENGINE_NAME} PUBLIC VK_USE_PLATFORM_VI_NN) + elseif(ANDROID) + target_compile_definitions(${ENGINE_NAME} PUBLIC VK_USE_PLATFORM_ANDROID_KHR) + elseif(IOS) + target_compile_definitions(${ENGINE_NAME} PUBLIC VK_USE_PLATFORM_IOS_MVK) + elseif(MACOSX) + target_compile_definitions(${ENGINE_NAME} PUBLIC VK_USE_PLATFORM_MACOS_MVK) + else() + target_compile_definitions(${ENGINE_NAME} PUBLIC VK_USE_PLATFORM_XCB_KHR) + endif() +endif() + +if(CC_USE_METAL) + target_compile_definitions(${ENGINE_NAME} PUBLIC CC_USE_METAL) +endif() + +if(CC_USE_GLES3) + target_compile_definitions(${ENGINE_NAME} PUBLIC CC_USE_GLES3) +endif() + +if(CC_USE_GLES2) + target_compile_definitions(${ENGINE_NAME} PUBLIC CC_USE_GLES2) +endif() + +set(COCOS_SOURCE_INCLUDES) +if(DEFINED COCOS_SOURCE_PLUGIN_INCLUDES) + list(APPEND COCOS_SOURCE_INCLUDES ${COCOS_SOURCE_PLUGIN_INCLUDES}) +endif() + +target_include_directories(${ENGINE_NAME} + PUBLIC + ${COCOS_SOURCE_INCLUDES} + ${CC_EXTERNAL_INCLUDES} + ${CWD} + ${CWD}/cocos + ${CWD}/cocos/renderer + ${CWD}/cocos/platform + ${CWD}/cocos/renderer/core + ${CWD}/cocos/editor-support + $<$:${CWD}/cocos/bindings/jswrapper> + PRIVATE + ${CC_EXTERNAL_PRIVATE_INCLUDES} +) + +target_compile_definitions(${ENGINE_NAME} + PRIVATE + ${CC_EXTERNAL_PRIVATE_DEFINITIONS} +) + +if(NOT APPLE) + target_include_directories(${ENGINE_NAME} PUBLIC + ${CWD}/external/sources/EGL + ) +endif() + +target_include_directories(${ENGINE_NAME} PUBLIC + ${CWD}/external/sources/khronos +) + +if(NX) + include(${CMAKE_CURRENT_LIST_DIR}/platform-nx/setup.cmake) +elseif(WINDOWS) + target_link_libraries(${ENGINE_NAME} PUBLIC + ws2_32 userenv psapi winmm Iphlpapi + ${CC_EXTERNAL_LIBS} + ) + cc_win32_definations(${ENGINE_NAME}) + + if(USE_MODULES) + cc_win32_definations(ccmath) + cc_win32_definations(cclog) + cc_win32_definations(ccunzip) + cc_win32_definations(ccfilesystem) + cc_win32_definations(ccutils) + cc_win32_definations(ccbindings) + + target_link_libraries(ccutils PUBLIC + ws2_32 psapi userenv Iphlpapi + ) + target_link_libraries(ccbindings PUBLIC + ws2_32 + ) + endif() +endif() + +if(ANDROID) + target_compile_options(${ENGINE_NAME} PRIVATE + -Wno-comment # nested block comments are actually useful sometimes + ) + + find_library(LIB_EGL NAMES EGL) + target_link_libraries(${ENGINE_NAME} PUBLIC + android + paddleboat_static + OpenSLES + ${LIB_EGL} + jnigraphics + ${CC_EXTERNAL_LIBS} + ) +endif() + +if(OHOS) + target_link_libraries(${ENGINE_NAME} PUBLIC + EGL + GLESv3 + zgraphic.z + image_pixelmap.z + rawfile.z + z + OpenSLES + hilog_ndk.z + ${CC_EXTERNAL_LIBS} + ) +endif() + +if(APPLE) + + target_compile_options(${ENGINE_NAME} PRIVATE + -Wno-objc-method-access + ) + + target_include_directories(${ENGINE_NAME} PUBLIC + ${CWD}/cocos/platform/ios + ) + target_link_libraries(${ENGINE_NAME} PUBLIC + "-liconv" + "-framework AudioToolbox" + "-framework Foundation" + "-framework OpenAL" + "-framework GameController" + "-framework Metal" + "-framework MetalKit" + "-framework QuartzCore" + "-framework MetalPerformanceShaders" + "-lsqlite3" + "-framework Security" + "-framework SystemConfiguration" + "$(inherited)" + ${CC_EXTERNAL_LIBS} + ) + set_target_properties(${ENGINE_NAME} PROPERTIES + XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "YES" + OSX_ARCHITECTURES "arm64;x86_64" + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/archives + ) + if(MACOSX) + target_link_libraries(${ENGINE_NAME} PUBLIC + "-framework OpenGL" + "-framework AppKit" + ) + target_compile_definitions(${ENGINE_NAME} PUBLIC + CC_KEYBOARD_SUPPORT + ) + elseif(IOS) + target_link_libraries(${ENGINE_NAME} PUBLIC + "-framework QuartzCore" + "-framework MetalPerformanceShaders" + "-framework UIKit" + "-framework AVKit" + "-framework WebKit" + "-framework CoreVideo" + "-framework CoreMotion" + "-framework CFNetwork" + "-framework CoreMedia" + "-framework CoreText" + "-framework CoreGraphics" + "-framework AVFoundation" + "-lz" + "-framework OpenGLES" + "-framework JavaScriptCore" + ) + set_property(TARGET ${ENGINE_NAME} PROPERTY XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET ${TARGET_IOS_VERSION}) + set_property(TARGET ${ENGINE_NAME} PROPERTY XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") + endif() + +endif() + +if(QNX) + include(${QNX_PATH}/setup.cmake) +elseif(LINUX) + set(LINUX_GRAPHIC_LIBS "") + if(NOT USE_SERVER_MODE) + list(APPEND LINUX_GRAPHIC_LIBS X11) + endif() + target_link_libraries(${ENGINE_NAME} PUBLIC + ${LINUX_GRAPHIC_LIBS} + ${CC_EXTERNAL_LIBS} + ) +endif() + +set(COCOS_SOURCE_PLUGIN_LIST_TEMP) +if(DEFINED COCOS_SOURCE_PLUGIN_LIST) + list(APPEND COCOS_SOURCE_PLUGIN_LIST_TEMP ${COCOS_SOURCE_PLUGIN_LIST}) +endif() + +if(USE_BUILTIN_EXTERNAL) + set(EXCLUDE_EXTERANL_LIST ${COCOS_SOURCE_LIST}) + foreach(x IN LISTS CC_EXTERNAL_SOURCES) + list(REMOVE_ITEM EXCLUDE_EXTERANL_LIST ${x}) + endforeach() + foreach(x IN LISTS COCOS_SOURCE_PLUGIN_LIST_TEMP) + list(REMOVE_ITEM EXCLUDE_EXTERANL_LIST ${x}) + endforeach() + source_group(TREE ${CWD} PREFIX "Source Files" FILES ${EXCLUDE_EXTERANL_LIST}) + source_group(TREE ${EXTERNAL_ROOT} PREFIX "Source Files/external" FILES ${CC_EXTERNAL_SOURCES}) + source_group("Plugin Files" FILES ${COCOS_SOURCE_PLUGIN_LIST_TEMP}) +else() + set(EXCLUDE_EXTERANL_LIST ${COCOS_SOURCE_LIST}) + foreach(x IN LISTS COCOS_SOURCE_PLUGIN_LIST_TEMP) + list(REMOVE_ITEM EXCLUDE_EXTERANL_LIST ${x}) + endforeach() + source_group(TREE ${CWD} PREFIX "Source Files" FILES ${EXCLUDE_EXTERANL_LIST}) + source_group("Plugin Files" FILES ${COCOS_SOURCE_PLUGIN_LIST_TEMP}) +endif() diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.cpp b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.cpp new file mode 100644 index 0000000..c757992 --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.cpp @@ -0,0 +1,660 @@ +/**************************************************************************** + Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#include "2d/renderer/Batcher2d.h" +#include "application/ApplicationManager.h" +#include "base/TypeDef.h" +#include "core/Root.h" +#include "editor-support/MiddlewareManager.h" +#include "renderer/pipeline/Define.h" +#include "scene/Pass.h" +#include + +namespace cc { + +Batcher2d::Batcher2d() : Batcher2d(nullptr) { + +} + +Batcher2d::Batcher2d(Root* root) +: _drawBatchPool([]() { return ccnew scene::DrawBatch2D(); }, [](auto* obj) { delete obj; }, 10U) { + if (root == nullptr) { + root = Root::getInstance(); + } + _root = root; + _device = _root->getDevice(); + _stencilManager = StencilManager::getInstance(); + + // LCC_UI_SORTING_GROUP + rendererCache.reserve(1024); + rendererOrder = false; +} + +Batcher2d::~Batcher2d() { // NOLINT + _drawBatchPool.destroy(); + + for (auto iter : _descriptorSetCache) { + delete iter.second; + } + + for (auto* drawBatch : _batches) { + delete drawBatch; + } + _attributes.clear(); + + if(_maskClearModel != nullptr) { + Root::getInstance()->destroyModel(_maskClearModel); + _maskClearModel = nullptr; + } + if (_maskModelMesh != nullptr) { + _maskModelMesh->destroy(); + _maskModelMesh = nullptr; + } + _maskClearMtl = nullptr; + _maskAttributes.clear(); + +} + +void Batcher2d::syncMeshBuffersToNative(uint16_t accId, ccstd::vector&& buffers) { + _meshBuffersMap[accId] = std::move(buffers); +} + +UIMeshBuffer* Batcher2d::getMeshBuffer(uint16_t accId, uint16_t bufferId) { // NOLINT(bugprone-easily-swappable-parameters) + const auto& map = _meshBuffersMap[accId]; + return map[bufferId]; +} + +gfx::Device* Batcher2d::getDevice() { + if (_device == nullptr) { + _device = Root::getInstance()->getDevice(); + } + return _device; +} + +void Batcher2d::updateDescriptorSet() { +} + +void Batcher2d::syncRootNodesToNative(ccstd::vector&& rootNodes) { + _rootNodeArr = std::move(rootNodes); +} + +void Batcher2d::fillBuffersAndMergeBatches() { + for (auto* rootNode : _rootNodeArr) { + walk(rootNode, 1, true, 0); + // CC_LOG_INFO("-------------- flushRendererCache 1 -------------- %d", _rootNodeArr.size()); + flushRendererCache(); // LCC_UI_SORTING_GROUP + generateBatch(_currEntity, _currDrawInfo); + } +} + +void Batcher2d::walk(Node* node, float parentOpacity, bool cacheEnable, float sortingPriority) { // NOLINT(misc-no-recursion) + if (!node->isActiveInHierarchy()) { + return; + } + sortingPriority = node->isUISortingEnabled() ? node->getUISortingPriority() : sortingPriority; + + bool breakWalk = false; + auto* entity = static_cast(node->getUserData()); + if (entity) { + if (entity->getColorDirty()) { + float localOpacity = entity->getLocalOpacity(); + float localColorAlpha = entity->getColorAlpha(); + entity->setOpacity(parentOpacity * localOpacity * localColorAlpha); + entity->setColorDirty(false); + entity->setVBColorDirty(true); + } + + // LCC_UI_SORTING_GROUP + if (entity->isEnabled()) { + if(entity->getIsMask() || !cacheEnable){ + // CC_LOG_INFO("-------------- flushRendererCache 2 --------------"); + flushRendererCache(); + uint32_t size = entity->getRenderDrawInfosSize(); + for (uint32_t i = 0; i < size; i++) { + auto* drawInfo = entity->getRenderDrawInfoAt(i); + handleDrawInfo(entity, drawInfo, node); + } + entity->setVBColorDirty(false); + }else{ + rendererCache.push_back(entity); + entity->setRenderPriority(sortingPriority); + if(sortingPriority != 0){ + rendererOrder = true; + } + } + } + + if (entity->getRenderEntityType() == RenderEntityType::CROSSED) { + breakWalk = true; + } + } + + if (!breakWalk) { + const auto& children = node->getChildren(); + float thisOpacity = entity ? entity->getOpacity() : parentOpacity; + for (const auto& child : children) { + // we should find parent opacity recursively upwards if it doesn't have an entity. + walk(child, thisOpacity, cacheEnable, sortingPriority); + } + } + + // post assembler + if (_stencilManager->getMaskStackSize() > 0 && entity && entity->isEnabled()) { + handlePostRender(entity); + } +} + +void Batcher2d::handlePostRender(RenderEntity* entity) { + bool isMask = entity->getIsMask(); + if (isMask) { + // CC_LOG_INFO("-------------- flushRendererCache 3 --------------"); + flushRendererCache(); // LCC_UI_SORTING_GROUP + + generateBatch(_currEntity, _currDrawInfo); + resetRenderStates(); + _stencilManager->exitMask(); + } +} +CC_FORCE_INLINE void Batcher2d::handleComponentDraw(RenderEntity* entity, RenderDrawInfo* drawInfo, Node* node) { + ccstd::hash_t dataHash = drawInfo->getDataHash(); + if (drawInfo->getIsMeshBuffer()) { + dataHash = 0; + } + + // may slow + bool isMask = entity->getIsMask(); + if (isMask) { + // Mask subComp + insertMaskBatch(entity); + } else { + entity->setEnumStencilStage(_stencilManager->getStencilStage()); + } + auto tempStage = static_cast(entity->getStencilStage()); + + if (_currHash != dataHash || dataHash == 0 || _currMaterial != drawInfo->getMaterial() || _currStencilStage != tempStage) { + // CC_LOG_INFO("handleComponentDraw break %u-%u %p-%p %d-%d", _currHash,dataHash, _currMaterial, drawInfo->getMaterial(), _currStencilStage, tempStage); + // Generate a batch if not batching + generateBatch(_currEntity, _currDrawInfo); + + if (!drawInfo->getIsMeshBuffer()) { + UIMeshBuffer* buffer = drawInfo->getMeshBuffer(); + if (_currMeshBuffer != buffer) { + _currMeshBuffer = buffer; + _indexStart = _currMeshBuffer->getIndexOffset(); + } + } + + _currHash = dataHash; + _currMaterial = drawInfo->getMaterial(); + _currStencilStage = tempStage; + _currLayer = entity->getNode()->getLayer(); + _currEntity = entity; + _currDrawInfo = drawInfo; + + _currTexture = drawInfo->getTexture(); + _currSampler = drawInfo->getSampler(); + if (_currSampler == nullptr) { + _currSamplerHash = 0; + } else { + _currSamplerHash = _currSampler->getHash(); + } + } + + if (!drawInfo->getIsMeshBuffer()) { + if (node->getChangedFlags() || drawInfo->getVertDirty()) { + fillVertexBuffers(entity, drawInfo); + drawInfo->setVertDirty(false); + } + if (entity->getVBColorDirty()) { + fillColors(entity, drawInfo); + } + + fillIndexBuffers(drawInfo); + } + + if (isMask) { + _stencilManager->enableMask(); + } +} + +CC_FORCE_INLINE void Batcher2d::handleModelDraw(RenderEntity* entity, RenderDrawInfo* drawInfo) { + generateBatch(_currEntity, _currDrawInfo); + resetRenderStates(); + + // stencil stage + gfx::DepthStencilState* depthStencil = nullptr; + ccstd::hash_t dssHash = 0; + Material* renderMat = drawInfo->getMaterial(); + + bool isMask = entity->getIsMask(); + if (isMask) { + //Mask Comp + insertMaskBatch(entity); + } else { + entity->setEnumStencilStage(_stencilManager->getStencilStage()); + } + + StencilStage entityStage = entity->getEnumStencilStage(); + depthStencil = _stencilManager->getDepthStencilState(entityStage, renderMat); + dssHash = _stencilManager->getStencilHash(entityStage); + + // Model + auto* model = drawInfo->getModel(); + if (model == nullptr) return; + auto stamp = CC_CURRENT_ENGINE()->getTotalFrames(); + model->updateTransform(stamp); + model->updateUBOs(stamp); + + const auto& subModelList = model->getSubModels(); + for (const auto& submodel : subModelList) { + auto* curdrawBatch = _drawBatchPool.alloc(); + curdrawBatch->setVisFlags(entity->getNode()->getLayer()); + curdrawBatch->setModel(model); + curdrawBatch->setInputAssembler(submodel->getInputAssembler()); + curdrawBatch->setDescriptorSet(submodel->getDescriptorSet()); + + curdrawBatch->fillPass(renderMat, depthStencil, dssHash, &(submodel->getPatches())); + _batches.push_back(curdrawBatch); + } + + if(isMask) { + _stencilManager->enableMask(); + } +} + +CC_FORCE_INLINE void Batcher2d::handleMiddlewareDraw(RenderEntity* entity, RenderDrawInfo* drawInfo) { + auto layer = entity->getNode()->getLayer(); + Material* material = drawInfo->getMaterial(); + auto* texture = drawInfo->getTexture(); + auto* sampler = drawInfo->getSampler(); + auto* meshBuffer = drawInfo->getMeshBuffer(); + + // check for merge draw + auto enableBatch = !entity->getUseLocal(); + if (enableBatch && _currTexture == texture && _currMeshBuffer == meshBuffer + && !_currEntity->getUseLocal() + && material->getHash() == _currMaterial->getHash() + && drawInfo->getIndexOffset() == _currDrawInfo->getIndexOffset() + _currDrawInfo->getIbCount() + && layer == _currLayer) { + auto ibCount = _currDrawInfo->getIbCount(); + _currDrawInfo->setIbCount(ibCount + drawInfo->getIbCount()); + } else { + generateBatch(_currEntity, _currDrawInfo); + _currLayer = layer; + _currMaterial = material; + _currTexture = texture; + _currMeshBuffer = meshBuffer; + _currEntity = entity; + _currDrawInfo = drawInfo; + _currHash = 0; + } +} + +CC_FORCE_INLINE void Batcher2d::handleSubNode(RenderEntity* entity, RenderDrawInfo* drawInfo) { // NOLINT + if (drawInfo->getSubNode()) { + walk(drawInfo->getSubNode(), entity->getOpacity(), false, 0); + } +} + +CC_FORCE_INLINE void Batcher2d::handleDrawInfo(RenderEntity* entity, RenderDrawInfo* drawInfo, Node* node) { //NOLINT(misc-no-recursion) + CC_ASSERT(entity); + CC_ASSERT(drawInfo); + RenderDrawInfoType drawInfoType = drawInfo->getEnumDrawInfoType(); + + switch (drawInfoType) { + case RenderDrawInfoType::COMP: + handleComponentDraw(entity, drawInfo, node); + break; + case RenderDrawInfoType::MODEL: + handleModelDraw(entity, drawInfo); + break; + case RenderDrawInfoType::MIDDLEWARE: + handleMiddlewareDraw(entity, drawInfo); + break; + case RenderDrawInfoType::SUB_NODE: + handleSubNode(entity, drawInfo); + break; + default: + break; + } +} + +void Batcher2d::generateBatch(RenderEntity* entity, RenderDrawInfo* drawInfo) { + if (drawInfo == nullptr) { + return; + } + if (drawInfo->getEnumDrawInfoType() == RenderDrawInfoType::MIDDLEWARE) { + generateBatchForMiddleware(entity, drawInfo); + return; + } + if (_currMaterial == nullptr) { + return; + } + gfx::InputAssembler* ia = nullptr; + if (drawInfo->getIsMeshBuffer()) { + // Todo MeshBuffer RenderData + ia = drawInfo->requestIA(getDevice()); + _meshRenderDrawInfo.emplace_back(drawInfo); + } else { + UIMeshBuffer* currMeshBuffer = drawInfo->getMeshBuffer(); + + currMeshBuffer->setDirty(true); + + ia = currMeshBuffer->requireFreeIA(getDevice()); + uint32_t indexCount = currMeshBuffer->getIndexOffset() - _indexStart; + if (ia == nullptr) { + return; + } + + ia->setFirstIndex(_indexStart); + ia->setIndexCount(indexCount); + _indexStart = currMeshBuffer->getIndexOffset(); + } + + _currMeshBuffer = nullptr; + + // stencilStage + gfx::DepthStencilState* depthStencil = nullptr; + ccstd::hash_t dssHash = 0; + StencilStage entityStage = entity->getEnumStencilStage(); + depthStencil = _stencilManager->getDepthStencilState(entityStage, _currMaterial); + dssHash = _stencilManager->getStencilHash(entityStage); + + auto* curdrawBatch = _drawBatchPool.alloc(); + curdrawBatch->setVisFlags(_currLayer); + curdrawBatch->setInputAssembler(ia); + curdrawBatch->fillPass(_currMaterial, depthStencil, dssHash); + const auto& pass = curdrawBatch->getPasses().at(0); + + if (entity->getUseLocal()) { + drawInfo->updateLocalDescriptorSet(entity->getRenderTransform(), pass->getLocalSetLayout()); + curdrawBatch->setDescriptorSet(drawInfo->getLocalDes()); + } else { + curdrawBatch->setDescriptorSet(getDescriptorSet(_currTexture, _currSampler, pass->getLocalSetLayout())); + } + _batches.push_back(curdrawBatch); +} + +void Batcher2d::generateBatchForMiddleware(RenderEntity* entity, RenderDrawInfo* drawInfo) { + auto layer = entity->getNode()->getLayer(); + auto* material = drawInfo->getMaterial(); + auto* texture = drawInfo->getTexture(); + auto* sampler = drawInfo->getSampler(); + auto* meshBuffer = drawInfo->getMeshBuffer(); + //set meshbuffer offset + auto indexOffset = drawInfo->getIndexOffset(); + auto indexCount = drawInfo->getIbCount(); + indexOffset += indexCount; + if (meshBuffer->getIndexOffset() < indexOffset) { + meshBuffer->setIndexOffset(indexOffset); + } + + meshBuffer->setDirty(true); + gfx::InputAssembler* ia = meshBuffer->requireFreeIA(getDevice()); + ia->setFirstIndex(drawInfo->getIndexOffset()); + ia->setIndexCount(drawInfo->getIbCount()); + + // stencilstage + auto stencilStage = _stencilManager->getStencilStage(); + gfx::DepthStencilState* depthStencil = _stencilManager->getDepthStencilState(stencilStage, material); + ccstd::hash_t dssHash = _stencilManager->getStencilHash(stencilStage); + + auto* curdrawBatch = _drawBatchPool.alloc(); + curdrawBatch->setVisFlags(_currLayer); + curdrawBatch->setInputAssembler(ia); + curdrawBatch->fillPass(material, depthStencil, dssHash); + const auto& pass = curdrawBatch->getPasses().at(0); + if (entity->getUseLocal()) { + drawInfo->updateLocalDescriptorSet(entity->getNode(), pass->getLocalSetLayout()); + curdrawBatch->setDescriptorSet(drawInfo->getLocalDes()); + } else { + curdrawBatch->setDescriptorSet(getDescriptorSet(texture, sampler, pass->getLocalSetLayout())); + } + _batches.push_back(curdrawBatch); + // make sure next generateBatch return. + resetRenderStates(); + _currMeshBuffer = nullptr; +} + +void Batcher2d::resetRenderStates() { + _currMaterial = nullptr; + _currTexture = nullptr; + _currSampler = nullptr; + _currSamplerHash = 0; + _currLayer = 0; + _currEntity = nullptr; + _currDrawInfo = nullptr; +} + +gfx::DescriptorSet* Batcher2d::getDescriptorSet(gfx::Texture* texture, gfx::Sampler* sampler, gfx::DescriptorSetLayout* dsLayout) { + ccstd::hash_t hash = 2; + size_t textureHash; + if (texture != nullptr) { + textureHash = boost::hash_value(texture); + ccstd::hash_combine(hash, textureHash); + } + if (sampler != nullptr) { + ccstd::hash_combine(hash, sampler->getHash()); + } + auto iter = _descriptorSetCache.find(hash); + if (iter != _descriptorSetCache.end()) { + if (texture != nullptr && sampler != nullptr) { + iter->second->bindTexture(static_cast(pipeline::ModelLocalBindings::SAMPLER_SPRITE), texture); + iter->second->bindSampler(static_cast(pipeline::ModelLocalBindings::SAMPLER_SPRITE), sampler); + } + iter->second->forceUpdate(); + return iter->second; + } + _dsInfo.layout = dsLayout; + auto* ds = getDevice()->createDescriptorSet(_dsInfo); + + if (texture != nullptr && sampler != nullptr) { + ds->bindTexture(static_cast(pipeline::ModelLocalBindings::SAMPLER_SPRITE), texture); + ds->bindSampler(static_cast(pipeline::ModelLocalBindings::SAMPLER_SPRITE), sampler); + } + ds->update(); + _descriptorSetCache.emplace(hash, ds); + + return ds; +} + +void Batcher2d::releaseDescriptorSetCache(gfx::Texture* texture, gfx::Sampler* sampler) { + ccstd::hash_t hash = 2; + size_t textureHash; + if (texture != nullptr) { + textureHash = boost::hash_value(texture); + ccstd::hash_combine(hash, textureHash); + } + if (sampler != nullptr) { + ccstd::hash_combine(hash, sampler->getHash()); + } + auto iter = _descriptorSetCache.find(hash); + if (iter != _descriptorSetCache.end()) { + delete iter->second; + _descriptorSetCache.erase(hash); + } +} + +bool Batcher2d::initialize() { + _isInit = true; + return _isInit; +} + +void Batcher2d::update() { + fillBuffersAndMergeBatches(); + resetRenderStates(); + + for (const auto& scene : Root::getInstance()->getScenes()) { + for (auto* batch : _batches) { + scene->addBatch(batch); + } + } +} + +void Batcher2d::uploadBuffers() { + if (_batches.empty()) { + return; + } + + for (auto& meshRenderData : _meshRenderDrawInfo) { + meshRenderData->uploadBuffers(); + } + + for (auto& map : _meshBuffersMap) { + for (auto& buffer : map.second) { + buffer->uploadBuffers(); + buffer->reset(); + } + } + updateDescriptorSet(); +} + +void Batcher2d::reset() { + for (auto& batch : _batches) { + batch->clear(); + _drawBatchPool.free(batch); + } + _batches.clear(); + + for (auto& meshRenderData : _meshRenderDrawInfo) { + meshRenderData->resetMeshIA(); + } + _meshRenderDrawInfo.clear(); + + // meshDataArray + for (auto& map : _meshBuffersMap) { + for (auto& buffer : map.second) { + if (buffer) { + buffer->resetIA(); + } + } + } + //meshBuffer cannot clear because it is not transported at every frame. + + _currMeshBuffer = nullptr; + _indexStart = 0; + _currHash = 0; + _currLayer = 0; + _currMaterial = nullptr; + _currTexture = nullptr; + _currSampler = nullptr; + + // stencilManager +} + +void Batcher2d::insertMaskBatch(RenderEntity* entity){ + generateBatch(_currEntity, _currDrawInfo); + resetRenderStates(); + createClearModel(); + _maskClearModel->setNode(entity->getNode()); + _maskClearModel->setTransform(entity->getNode()); + _stencilManager->pushMask(); + auto stage = _stencilManager->clear(entity); + + gfx::DepthStencilState* depthStencil = nullptr; + ccstd::hash_t dssHash = 0; + if(_maskClearMtl != nullptr){ + depthStencil = _stencilManager->getDepthStencilState(stage, _maskClearMtl); + dssHash = _stencilManager->getStencilHash(stage); + } + + // Model + if (_maskClearModel == nullptr) return; + auto stamp = CC_CURRENT_ENGINE()->getTotalFrames(); + _maskClearModel->updateTransform(stamp); + _maskClearModel->updateUBOs(stamp); + + const auto& subModelList = _maskClearModel->getSubModels(); + for (const auto& submodel : subModelList) { + auto* curdrawBatch = _drawBatchPool.alloc(); + curdrawBatch->setVisFlags(entity->getNode()->getLayer()); + curdrawBatch->setModel(_maskClearModel); + curdrawBatch->setInputAssembler(submodel->getInputAssembler()); + curdrawBatch->setDescriptorSet(submodel->getDescriptorSet()); + + curdrawBatch->fillPass(_maskClearMtl, depthStencil, dssHash, &(submodel->getPatches())); + _batches.push_back(curdrawBatch); + } + + _stencilManager->enterLevel(entity); +} + +void Batcher2d::createClearModel() { + if (_maskClearModel == nullptr) { + _maskClearMtl = BuiltinResMgr::getInstance()->get(ccstd::string("default-clear-stencil")); + + _maskClearModel = Root::getInstance()->createModel(); + uint32_t stride = 12;// vfmt + + auto* vertexBuffer = _device->createBuffer({ + gfx::BufferUsageBit::VERTEX | gfx::BufferUsageBit::TRANSFER_DST, + gfx::MemoryUsageBit::DEVICE, + 4 * stride, + stride, + }); + const float vertices[] = {-1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0}; + vertexBuffer->update(vertices); + auto* indexBuffer = _device->createBuffer({ + gfx::BufferUsageBit::INDEX | gfx::BufferUsageBit::TRANSFER_DST, + gfx::MemoryUsageBit::DEVICE, + 6 * sizeof(uint16_t), + sizeof(uint16_t), + }); + const uint16_t indices[] = {0, 2, 1, 2, 1, 3}; + indexBuffer->update(indices); + + gfx::BufferList vbReference; + vbReference.emplace_back(vertexBuffer); + _maskModelMesh = ccnew RenderingSubMesh(vbReference, _maskAttributes, _primitiveMode, indexBuffer); + _maskModelMesh->setSubMeshIdx(0); + + _maskClearModel->initSubModel(0, _maskModelMesh, _maskClearMtl); + } +} + +// LCC_UI_SORTING_GROUP +void Batcher2d::flushRendererCache() { + if(rendererCache.size() > 0){ + if(rendererOrder){ + std::stable_sort(rendererCache.begin(), rendererCache.end(), [](RenderEntity* a, RenderEntity* b) { return a->getRenderPriority() < b->getRenderPriority(); }); + } + // CC_LOG_INFO("flushRendererCache %d", rendererCache.size()); + for(ccstd::vector::iterator it = rendererCache.begin(); it != rendererCache.end(); it++) + { + RenderEntity* entity = *it; + // CC_LOG_INFO("%f", entity->getRenderPriority()); + uint32_t size = entity->getRenderDrawInfosSize(); + for (uint32_t i = 0; i < size; i++) { + auto* drawInfo = entity->getRenderDrawInfoAt(i); + handleDrawInfo(entity, drawInfo, entity->getNode()); + } + entity->setVBColorDirty(false); + } + rendererCache.clear(); + } + rendererOrder = false; +} + +} // namespace cc diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.h b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.h new file mode 100644 index 0000000..3af2e0b --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.h @@ -0,0 +1,208 @@ +/**************************************************************************** + Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#pragma once +#include "2d/renderer/RenderDrawInfo.h" +#include "2d/renderer/RenderEntity.h" +#include "2d/renderer/UIMeshBuffer.h" +#include "base/Macros.h" +#include "base/Ptr.h" +#include "base/TypeDef.h" +#include "core/assets/Material.h" +#include "core/memop/Pool.h" +#include "renderer/gfx-base/GFXTexture.h" +#include "renderer/gfx-base/states/GFXSampler.h" +#include "scene/DrawBatch2D.h" + +namespace cc { +class Root; +using UIMeshBufferArray = ccstd::vector; +using UIMeshBufferMap = ccstd::unordered_map; + +class Batcher2d final { +public: + Batcher2d(); + explicit Batcher2d(Root* root); + ~Batcher2d(); + + void syncMeshBuffersToNative(uint16_t accId, ccstd::vector&& buffers); + + bool initialize(); + void update(); + void uploadBuffers(); + void reset(); + + void syncRootNodesToNative(ccstd::vector&& rootNodes); + void releaseDescriptorSetCache(gfx::Texture* texture, gfx::Sampler* sampler); + + UIMeshBuffer* getMeshBuffer(uint16_t accId, uint16_t bufferId); + gfx::Device* getDevice(); + inline ccstd::vector* getDefaultAttribute() { return &_attributes; } + + void updateDescriptorSet(); + + void fillBuffersAndMergeBatches(); + void walk(Node* node, float parentOpacity, bool cacheEnable, float sortingPriority); + void handlePostRender(RenderEntity* entity); + void handleDrawInfo(RenderEntity* entity, RenderDrawInfo* drawInfo, Node* node); + void handleComponentDraw(RenderEntity* entity, RenderDrawInfo* drawInfo, Node* node); + void handleModelDraw(RenderEntity* entity, RenderDrawInfo* drawInfo); + void handleMiddlewareDraw(RenderEntity* entity, RenderDrawInfo* drawInfo); + void handleSubNode(RenderEntity* entity, RenderDrawInfo* drawInfo); + void generateBatch(RenderEntity* entity, RenderDrawInfo* drawInfo); + void generateBatchForMiddleware(RenderEntity* entity, RenderDrawInfo* drawInfo); + void resetRenderStates(); + +private: + bool _isInit = false; + + inline void fillIndexBuffers(RenderDrawInfo* drawInfo) { // NOLINT(readability-convert-member-functions-to-static) + uint16_t* ib = drawInfo->getIDataBuffer(); + + UIMeshBuffer* buffer = drawInfo->getMeshBuffer(); + uint32_t indexOffset = buffer->getIndexOffset(); + + uint16_t* indexb = drawInfo->getIbBuffer(); + uint32_t indexCount = drawInfo->getIbCount(); + + memcpy(&ib[indexOffset], indexb, indexCount * sizeof(uint16_t)); + indexOffset += indexCount; + + buffer->setIndexOffset(indexOffset); + } + + inline void fillVertexBuffers(RenderEntity* entity, RenderDrawInfo* drawInfo) { // NOLINT(readability-convert-member-functions-to-static) + Node* node = entity->getNode(); + const Mat4& matrix = node->getWorldMatrix(); + uint8_t stride = drawInfo->getStride(); + uint32_t size = drawInfo->getVbCount() * stride; + float* vbBuffer = drawInfo->getVbBuffer(); + for (int i = 0; i < size; i += stride) { + Render2dLayout* curLayout = drawInfo->getRender2dLayout(i); + // make sure that the layout of Vec3 is three consecutive floats + static_assert(sizeof(Vec3) == 3 * sizeof(float)); + // cast to reduce value copy instructions + reinterpret_cast(vbBuffer + i)->transformMat4(curLayout->position, matrix); + } + } + + inline void setIndexRange(RenderDrawInfo* drawInfo) { // NOLINT(readability-convert-member-functions-to-static) + UIMeshBuffer* buffer = drawInfo->getMeshBuffer(); + uint32_t indexOffset = drawInfo->getIndexOffset(); + uint32_t indexCount = drawInfo->getIbCount(); + indexOffset += indexCount; + if (buffer->getIndexOffset() < indexOffset) { + buffer->setIndexOffset(indexOffset); + } + } + + inline void fillColors(RenderEntity* entity, RenderDrawInfo* drawInfo) { // NOLINT(readability-convert-member-functions-to-static) + Color temp = entity->getColor(); + + uint8_t stride = drawInfo->getStride(); + uint32_t size = drawInfo->getVbCount() * stride; + float* vbBuffer = drawInfo->getVbBuffer(); + + uint32_t offset = 0; + for (int i = 0; i < size; i += stride) { + offset = i + 5; + vbBuffer[offset++] = static_cast(temp.r) / 255.0F; + vbBuffer[offset++] = static_cast(temp.g) / 255.0F; + vbBuffer[offset++] = static_cast(temp.b) / 255.0F; + vbBuffer[offset++] = entity->getOpacity(); + } + } + + void insertMaskBatch(RenderEntity* entity); + void createClearModel (); + + // LCC_UI_SORTING_GROUP + ccstd::vector rendererCache; + bool rendererOrder; + void flushRendererCache(); + + gfx::DescriptorSet* getDescriptorSet(gfx::Texture* texture, gfx::Sampler* sampler, gfx::DescriptorSetLayout* dsLayout); + + StencilManager* _stencilManager{nullptr}; + + // weak reference + Root* _root{nullptr}; + // weak reference + ccstd::vector _rootNodeArr; + + // manage memory manually + ccstd::vector _batches; + memop::Pool _drawBatchPool; + + // weak reference + gfx::Device* _device{nullptr}; // use getDevice() + + // weak reference + RenderEntity* _currEntity{nullptr}; + // weak reference + RenderDrawInfo* _currDrawInfo{nullptr}; + // weak reference + UIMeshBuffer* _currMeshBuffer{nullptr}; + uint32_t _indexStart{0}; + ccstd::hash_t _currHash{0}; + uint32_t _currLayer{0}; + StencilStage _currStencilStage{StencilStage::DISABLED}; + + // weak reference + Material* _currMaterial{nullptr}; + // weak reference + gfx::Texture* _currTexture{nullptr}; + // weak reference + gfx::Sampler* _currSampler{nullptr}; + ccstd::hash_t _currSamplerHash{0}; + + // weak reference + ccstd::vector _meshRenderDrawInfo; + + // manage memory manually + ccstd::unordered_map _descriptorSetCache; + gfx::DescriptorSetInfo _dsInfo; + + UIMeshBufferMap _meshBuffersMap; + + // DefaultAttribute + ccstd::vector _attributes{ + gfx::Attribute{gfx::ATTR_NAME_POSITION, gfx::Format::RGB32F}, + gfx::Attribute{gfx::ATTR_NAME_TEX_COORD, gfx::Format::RG32F}, + gfx::Attribute{gfx::ATTR_NAME_COLOR, gfx::Format::RGBA32F}, + }; + + // Mask use + IntrusivePtr _maskClearModel; + IntrusivePtr _maskClearMtl; + IntrusivePtr _maskModelMesh; + ccstd::vector _maskAttributes{ + gfx::Attribute{gfx::ATTR_NAME_POSITION, gfx::Format::RGB32F}, + }; + gfx::PrimitiveMode _primitiveMode{gfx::PrimitiveMode::TRIANGLE_LIST}; + + CC_DISALLOW_COPY_MOVE_ASSIGN(Batcher2d); +}; +} // namespace cc diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.cpp b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.cpp new file mode 100644 index 0000000..98a741b --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.cpp @@ -0,0 +1,116 @@ +/**************************************************************************** + Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#include "2d/renderer/RenderEntity.h" +#include "2d/renderer/Batcher2d.h" +#include "bindings/utils/BindingUtils.h" + +namespace cc { +RenderEntity::RenderEntity(RenderEntityType type) : _renderEntityType(type) { + if (type == RenderEntityType::STATIC) { + ccnew_placement(&_staticDrawInfos) std::array(); + } else { + ccnew_placement(&_dynamicDrawInfos) ccstd::vector(); + } + _entitySharedBufferActor.initialize(&_entityAttrLayout, sizeof(EntityAttrLayout)); +} + +RenderEntity::~RenderEntity() { + if (_renderEntityType == RenderEntityType::STATIC) { + _staticDrawInfos.~array(); + } else { + _dynamicDrawInfos.~vector(); + } +}; + +void RenderEntity::addDynamicRenderDrawInfo(RenderDrawInfo* drawInfo) { + CC_ASSERT(_renderEntityType != RenderEntityType::STATIC); + _dynamicDrawInfos.push_back(drawInfo); +} +void RenderEntity::setDynamicRenderDrawInfo(RenderDrawInfo* drawInfo, uint32_t index) { + CC_ASSERT(_renderEntityType != RenderEntityType::STATIC); + if (index < _dynamicDrawInfos.size()) { + _dynamicDrawInfos[index] = drawInfo; + } +} +void RenderEntity::removeDynamicRenderDrawInfo() { + CC_ASSERT(_renderEntityType != RenderEntityType::STATIC); + if (_dynamicDrawInfos.empty()) return; + _dynamicDrawInfos.pop_back(); // warning: memory leaking & crash +} + +void RenderEntity::clearDynamicRenderDrawInfos() { + CC_ASSERT(_renderEntityType != RenderEntityType::STATIC); + _dynamicDrawInfos.clear(); +} + +void RenderEntity::clearStaticRenderDrawInfos() { + CC_ASSERT(_renderEntityType == RenderEntityType::STATIC); + + for (uint32_t i = 0; i < _staticDrawInfoSize; i++) { + RenderDrawInfo& drawInfo = _staticDrawInfos[i]; + drawInfo.resetDrawInfo(); + } + _staticDrawInfoSize = 0; +} + +void RenderEntity::setNode(Node* node) { + if (_node) { + _node->setUserData(nullptr); + } + _node = node; + if (_node) { + _node->setUserData(this); + } +} + +void RenderEntity::setRenderTransform(Node* renderTransform) { + _renderTransform = renderTransform; +} + +RenderDrawInfo* RenderEntity::getDynamicRenderDrawInfo(uint32_t index) { + CC_ASSERT(_renderEntityType != RenderEntityType::STATIC); + if (index >= _dynamicDrawInfos.size()) { + return nullptr; + } + return _dynamicDrawInfos[index]; +} +ccstd::vector& RenderEntity::getDynamicRenderDrawInfos() { + CC_ASSERT(_renderEntityType != RenderEntityType::STATIC); + return _dynamicDrawInfos; +} +void RenderEntity::setStaticDrawInfoSize(uint32_t size) { + CC_ASSERT(_renderEntityType == RenderEntityType::STATIC && size <= RenderEntity::STATIC_DRAW_INFO_CAPACITY); + _staticDrawInfoSize = size; +} +RenderDrawInfo* RenderEntity::getStaticRenderDrawInfo(uint32_t index) { + CC_ASSERT(_renderEntityType == RenderEntityType::STATIC && index < _staticDrawInfoSize); + return &(_staticDrawInfos[index]); +} +std::array& RenderEntity::getStaticRenderDrawInfos() { + CC_ASSERT(_renderEntityType == RenderEntityType::STATIC); + return _staticDrawInfos; +} +} // namespace cc diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.h b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.h new file mode 100644 index 0000000..05a5075 --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.h @@ -0,0 +1,164 @@ +/**************************************************************************** + Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#pragma once +#include +#include "2d/renderer/RenderDrawInfo.h" +#include "2d/renderer/StencilManager.h" +#include "base/Macros.h" +#include "base/TypeDef.h" +#include "bindings/utils/BindingUtils.h" +#include "core/ArrayBuffer.h" +#include "core/scene-graph/Node.h" + +namespace cc { +class Batcher2d; + +enum class RenderEntityType : uint8_t { + STATIC, + DYNAMIC, + CROSSED, +}; + +enum class MaskMode : uint8_t { + NONE, + MASK, + MASK_INVERTED, + MASK_NODE, + MASK_NODE_INVERTED +}; + +struct EntityAttrLayout { + float localOpacity{1.0F}; + uint8_t colorR{255}; + uint8_t colorG{255}; + uint8_t colorB{255}; + uint8_t colorA{255}; + uint8_t maskMode{0}; + uint8_t colorDirtyBit{1}; + uint8_t enabledIndex{0}; + uint8_t useLocal{0}; +}; + +class RenderEntity final : public Node::UserData { +public: + static constexpr uint32_t STATIC_DRAW_INFO_CAPACITY = 4; + + explicit RenderEntity(RenderEntityType type); + ~RenderEntity() override; + + void addDynamicRenderDrawInfo(RenderDrawInfo* drawInfo); + void setDynamicRenderDrawInfo(RenderDrawInfo* drawInfo, uint32_t index); + void removeDynamicRenderDrawInfo(); + void clearDynamicRenderDrawInfos(); + void clearStaticRenderDrawInfos(); + + inline bool getIsMask() const { + return static_cast(_entityAttrLayout.maskMode) == MaskMode::MASK || static_cast(_entityAttrLayout.maskMode) == MaskMode::MASK_INVERTED; + } + + inline bool getIsSubMask() const { + return static_cast(_entityAttrLayout.maskMode) == MaskMode::MASK_NODE || static_cast(_entityAttrLayout.maskMode) == MaskMode::MASK_NODE_INVERTED; + } + + inline bool getIsMaskInverted() const { + return static_cast(_entityAttrLayout.maskMode) == MaskMode::MASK_INVERTED || static_cast(_entityAttrLayout.maskMode) == MaskMode::MASK_NODE_INVERTED; + } + + inline bool getUseLocal() const { return _entityAttrLayout.useLocal; } + inline void setUseLocal(bool useLocal) { + _entityAttrLayout.useLocal = useLocal; + } + + inline Node* getNode() const { return _node; } + void setNode(Node* node); + + inline Node* getRenderTransform() const { return _renderTransform; } + void setRenderTransform(Node* renderTransform); + + inline uint32_t getStencilStage() const { return static_cast(_stencilStage); } + inline void setStencilStage(uint32_t stage) { + _stencilStage = static_cast(stage); + } + inline StencilStage getEnumStencilStage() const { return _stencilStage; } + inline void setEnumStencilStage(StencilStage stage) { + _stencilStage = stage; + } + + inline RenderEntityType getRenderEntityType() const { return _renderEntityType; }; + + inline uint32_t getStaticDrawInfoSize() const { return _staticDrawInfoSize; }; + void setStaticDrawInfoSize(uint32_t size); + + RenderDrawInfo* getStaticRenderDrawInfo(uint32_t index); + std::array& getStaticRenderDrawInfos(); + RenderDrawInfo* getDynamicRenderDrawInfo(uint32_t index); + ccstd::vector& getDynamicRenderDrawInfos(); + + inline se::Object* getEntitySharedBufferForJS() const { return _entitySharedBufferActor.getSharedArrayBufferObject(); } + inline bool getColorDirty() const { return _entityAttrLayout.colorDirtyBit != 0; } + inline void setColorDirty(bool dirty) { _entityAttrLayout.colorDirtyBit = dirty ? 1 : 0; } + inline bool getVBColorDirty() const { return _vbColorDirty; } + inline void setVBColorDirty(bool vbColorDirty) { _vbColorDirty = vbColorDirty; } + inline Color getColor() const { return Color(_entityAttrLayout.colorR, _entityAttrLayout.colorG, _entityAttrLayout.colorB, _entityAttrLayout.colorA); } + inline float getColorAlpha() const { return static_cast(_entityAttrLayout.colorA) / 255.F; } + inline float getLocalOpacity() const { return _entityAttrLayout.localOpacity; } + inline float getOpacity() const { return _opacity; } + inline void setOpacity(float opacity) { _opacity = opacity; } + inline bool isEnabled() const { return _entityAttrLayout.enabledIndex != 0; } + inline uint32_t getRenderDrawInfosSize() const { + return _renderEntityType == RenderEntityType::STATIC ? _staticDrawInfoSize : static_cast(_dynamicDrawInfos.size()); + } + inline RenderDrawInfo* getRenderDrawInfoAt(uint32_t index) { + return _renderEntityType == RenderEntityType::STATIC ? &(_staticDrawInfos[index]) : _dynamicDrawInfos[index]; + } + + inline float getRenderPriority() const { return _renderPriority; } + inline void setRenderPriority(float value) { _renderPriority = value; } + +private: + CC_DISALLOW_COPY_MOVE_ASSIGN(RenderEntity); + // weak reference + Node* _node{nullptr}; + + // weak reference + Node* _renderTransform{nullptr}; + + EntityAttrLayout _entityAttrLayout; + float _opacity{1.0F}; + + bindings::NativeMemorySharedToScriptActor _entitySharedBufferActor; + union { + std::array _staticDrawInfos; + ccstd::vector _dynamicDrawInfos; + }; + StencilStage _stencilStage{StencilStage::DISABLED}; + RenderEntityType _renderEntityType{RenderEntityType::STATIC}; + uint8_t _staticDrawInfoSize{0}; + bool _vbColorDirty{true}; + + float _renderPriority{0.0F}; +}; +} // namespace cc diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.cpp b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.cpp new file mode 100644 index 0000000..6bf3afe --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.cpp @@ -0,0 +1,984 @@ +/**************************************************************************** + Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "core/scene-graph/Node.h" +#include "base/StringUtil.h" +#include "core/data/Object.h" +#include "core/memop/CachedArray.h" +#include "core/platform/Debug.h" +#include "core/scene-graph/NodeEnum.h" +#include "core/scene-graph/Scene.h" +#include "core/utils/IDGenerator.h" +#include "math/Utils.h" + +namespace cc { + +// static variables + +uint32_t Node::clearFrame{0}; +uint32_t Node::clearRound{1000}; +const uint32_t Node::TRANSFORM_ON{1 << 0}; +uint32_t Node::globalFlagChangeVersion{0}; + +namespace { +const ccstd::string EMPTY_NODE_NAME; +IDGenerator idGenerator("Node"); + +ccstd::vector dirtyNodes; +CC_FORCE_INLINE void setDirtyNode(const index_t idx, Node *node) { + if (idx >= dirtyNodes.size()) { + if (idx >= dirtyNodes.capacity()) { + size_t minCapacity = std::max((idx + 1) * 2, 32); + if (minCapacity > dirtyNodes.capacity()) { + dirtyNodes.reserve(minCapacity); // Make a pre-allocated size for dirtyNode vector for better grow performance. + } + } + dirtyNodes.resize(idx + 1, nullptr); + } + dirtyNodes[idx] = node; +} + +CC_FORCE_INLINE Node *getDirtyNode(const index_t idx) { + if (idx < 0 || idx >= dirtyNodes.size()) { + return nullptr; + } + return dirtyNodes[idx]; +} + +} // namespace + +Node::Node() : Node(EMPTY_NODE_NAME) { +} + +Node::Node(const ccstd::string &name) { +#define NODE_SHARED_MEMORY_BYTE_LENGTH (24) + static_assert(offsetof(Node, _uiSortingEnabled) + sizeof(_uiSortingEnabled) - offsetof(Node, _eventMask) == NODE_SHARED_MEMORY_BYTE_LENGTH, "Wrong shared memory size"); + _sharedMemoryActor.initialize(&_eventMask, NODE_SHARED_MEMORY_BYTE_LENGTH); +#undef NODE_SHARED_MEMORY_BYTE_LENGTH + + _id = idGenerator.getNewId(); + if (name.empty()) { + _name.append("New Node"); + } else { + _name = name; + } + _eventProcessor = ccnew NodeEventProcessor(this); +} + +Node::~Node() { + CC_SAFE_DELETE(_eventProcessor); + if (!_children.empty()) { + // Reset children's _parent to nullptr to avoid dangerous pointer + for (const auto &child : _children) { + child->_parent = nullptr; + } + } +} + +void Node::onBatchCreated(bool dontChildPrefab) { + // onBatchCreated was implemented in TS, so code should never go here. + CC_ASSERT(false); + emit(EventTypesToJS::NODE_ON_BATCH_CREATED, dontChildPrefab); +} + +Node *Node::instantiate(Node *cloned, bool isSyncedNode) { + if (!cloned) { + CC_ASSERT(false); + // TODO(): cloned = legacyCC.instantiate._clone(this, this); + return nullptr; + } + // TODO(): + // const newPrefabInfo = cloned._prefab; + // if (EDITOR && newPrefabInfo) { + // if (cloned == = newPrefabInfo.root) { + // // newPrefabInfo.fileId = ''; + // } else { + // // var PrefabUtils = Editor.require('scene://utils/prefab'); + // // PrefabUtils.unlinkPrefab(cloned); + // } + //} + // if (EDITOR && legacyCC.GAME_VIEW) { + // const syncing = newPrefabInfo&& cloned == = newPrefabInfo.root && newPrefabInfo.sync; + // if (!syncing) { + // cloned._name += ' (Clone)'; + // } + //} + cloned->_parent = nullptr; + cloned->onBatchCreated(isSyncedNode); + return cloned; +} + +void Node::onHierarchyChangedBase(Node *oldParent) { // NOLINT(misc-unused-parameters) + Node *newParent = _parent; + auto *scene = dynamic_cast(newParent); + if (isPersistNode() && scene == nullptr) { + emit(EventTypesToJS::NODE_REMOVE_PERSIST_ROOT_NODE); +#if CC_EDITOR + debug::warnID(1623); +#endif + } +#if CC_EDITOR + auto *curScene = getScene(); + const bool inCurrentSceneBefore = oldParent && oldParent->isChildOf(curScene); + const bool inCurrentSceneNow = newParent && newParent->isChildOf(curScene); + if (!inCurrentSceneBefore && inCurrentSceneNow) { + // attached + this->notifyEditorAttached(true); + } else if (inCurrentSceneBefore && !inCurrentSceneNow) { + // detached + this->notifyEditorAttached(false); + } + // conflict detection + // _Scene.DetectConflict.afterAddChild(this); +#endif + + bool shouldActiveNow = isActive() && !!(newParent && newParent->isActiveInHierarchy()); + if (isActiveInHierarchy() != shouldActiveNow) { + // Director::getInstance()->getNodeActivator()->activateNode(this, shouldActiveNow); // TODO(xwx): use TS temporarily + emit(EventTypesToJS::NODE_ACTIVE_NODE, shouldActiveNow); + } +} + +void Node::off(const CallbacksInvoker::KeyType &type, bool useCapture) { + _eventProcessor->offAll(type, useCapture); + bool hasListeners = _eventProcessor->hasEventListener(type); + if (!hasListeners) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask &= ~TRANSFORM_ON; + } + } +} + +void Node::off(const CallbacksInvoker::KeyType &type, const CallbackID &cbID, bool useCapture) { + _eventProcessor->off(type, cbID, useCapture); + bool hasListeners = _eventProcessor->hasEventListener(type); + if (!hasListeners) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask &= ~TRANSFORM_ON; + } + } +} + +void Node::off(const CallbacksInvoker::KeyType &type, void *target, bool useCapture) { + _eventProcessor->off(type, target, useCapture); + bool hasListeners = _eventProcessor->hasEventListener(type); + if (!hasListeners) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask &= ~TRANSFORM_ON; + } + } +} + +//void Node::dispatchEvent(event::Event *eve) { +// _eventProcessor->dispatchEvent(eve); +//} + +bool Node::hasEventListener(const CallbacksInvoker::KeyType &type) const { + return _eventProcessor->hasEventListener(type); +} + +bool Node::hasEventListener(const CallbacksInvoker::KeyType &type, const CallbackID &cbID) const { + return _eventProcessor->hasEventListener(type, cbID); +} +bool Node::hasEventListener(const CallbacksInvoker::KeyType &type, void *target) const { + return _eventProcessor->hasEventListener(type, target); +} +bool Node::hasEventListener(const CallbacksInvoker::KeyType &type, void *target, const CallbackID &cbID) const { + return _eventProcessor->hasEventListener(type, target, cbID); +} + +void Node::targetOff(const CallbacksInvoker::KeyType &type) { + _eventProcessor->targetOff(type); + if ((_eventMask & TRANSFORM_ON) && !_eventProcessor->hasEventListener(NodeEventType::TRANSFORM_CHANGED)) { + _eventMask &= ~TRANSFORM_ON; + } +} + +void Node::setActive(bool isActive) { + uint8_t isActiveU8 = isActive ? 1 : 0; + if (_active != isActiveU8) { + _active = isActiveU8; + Node *parent = _parent; + if (parent) { + bool couldActiveInScene = parent->isActiveInHierarchy(); + if (couldActiveInScene) { + // Director::getInstance()->getNodeActivator()->activateNode(this, isActive); // TODO(xwx): use TS temporarily + emit(EventTypesToJS::NODE_ACTIVE_NODE, isActive); + } + } + } +} + +void Node::setParent(Node *parent, bool isKeepWorld /* = false */) { + if (isKeepWorld) { + updateWorldTransform(); + } + + if (_parent == parent) { + return; + } + + Node *oldParent = _parent; + Node *newParent = parent; +#if CC_DEBUG > 0 + if (oldParent && (oldParent->_objFlags & Flags::DEACTIVATING) == Flags::DEACTIVATING) { + debug::errorID(3821); + } +#endif + _parent = newParent; + _siblingIndex = 0; + onSetParent(oldParent, isKeepWorld); + emit(NodeEventType::PARENT_CHANGED, oldParent); + if (oldParent) { + if (!(oldParent->_objFlags & Flags::DESTROYING)) { + index_t removeAt = getIdxOfChild(oldParent->_children, this); + // TODO(): DEV + /*if (DEV && removeAt < 0) { + errorID(1633); + return; + }*/ + if (removeAt < 0) { + return; + } + oldParent->_children.erase(oldParent->_children.begin() + removeAt); + oldParent->updateSiblingIndex(); + oldParent->emit(NodeEventType::CHILD_REMOVED, this); + } + } + if (newParent) { +#if CC_DEBUG > 0 + if ((newParent->_objFlags & Flags::DEACTIVATING) == Flags::DEACTIVATING) { + debug::errorID(3821); + } +#endif + newParent->_children.emplace_back(this); + _siblingIndex = static_cast(newParent->_children.size() - 1); + newParent->emit(NodeEventType::CHILD_ADDED, this); + } + onHierarchyChanged(oldParent); +} + +void Node::walk(const WalkCallback &preFunc) { + walk(preFunc, nullptr); +} + +void Node::walk(const WalkCallback &preFunc, const WalkCallback &postFunc) { //NOLINT(misc-no-recursion) + if (preFunc) { + preFunc(this); + } + + for (const auto &child : _children) { + if (child) { + child->walk(preFunc, postFunc); + } + } + + if (postFunc) { + postFunc(this); + } +} + +//Component *Node::addComponent(Component *comp) { +// comp->_node = this; // cjh TODO: shared_ptr +// _components.emplace_back(comp); +// +// if (isActiveInHierarchy()) { +// NodeActivator::activateComp(comp); +// } +// +// return comp; +//} +// +//void Node::removeComponent(Component *comp) { +// auto iteComp = std::find(_components.begin(), _components.end(), comp); +// if (iteComp != _components.end()) { +// _components.erase(iteComp); +// } +//} + +bool Node::onPreDestroyBase() { + Flags destroyingFlag = Flags::DESTROYING; + _objFlags |= destroyingFlag; + bool destroyByParent = (!!_parent) && (!!(_parent->_objFlags & destroyingFlag)); +#if CC_EDITOR + if (!destroyByParent) { + this->notifyEditorAttached(false); + } +#endif + if (isPersistNode()) { + emit(EventTypesToJS::NODE_REMOVE_PERSIST_ROOT_NODE); + } + if (!destroyByParent) { + if (_parent) { + emit(NodeEventType::PARENT_CHANGED, this); + index_t childIdx = getIdxOfChild(_parent->_children, this); + if (childIdx != -1) { + _parent->_children.erase(_parent->_children.begin() + childIdx); + } + _siblingIndex = 0; + _parent->updateSiblingIndex(); + _parent->emit(NodeEventType::CHILD_REMOVED, this); + } + } + + //NOTE: The following code is not needed now since we override Node._onPreDestroy in node.jsb.ts + // and the logic will be done in TS. + // emit(NodeEventType::NODE_DESTROYED, this); + // for (const auto &child : _children) { + // child->destroyImmediate(); + // } + // + // emit(EventTypesToJS::NODE_DESTROY_COMPONENTS); + + _eventProcessor->destroy(); + return destroyByParent; +} + +Node *Node::getChildByName(const ccstd::string &name) const { + if (name.empty()) { + CC_LOG_INFO("Invalid name"); + return nullptr; + } + for (const auto &child : _children) { + if (child->_name == name) { + return child; + } + } + return nullptr; +} + +void Node::setScene(Node *node) { + node->updateScene(); +} + +void Node::updateScene() { + if (_parent == nullptr) { + return; + } + _scene = _parent->_scene; + emit(EventTypesToJS::NODE_SCENE_UPDATED, _scene); +} + +/* static */ +index_t Node::getIdxOfChild(const ccstd::vector> &child, Node *target) { + auto iteChild = std::find(child.begin(), child.end(), target); + if (iteChild != child.end()) { + return static_cast(iteChild - child.begin()); + } + return CC_INVALID_INDEX; +} + +Node *Node::getChildByUuid(const ccstd::string &uuid) const { + if (uuid.empty()) { + CC_LOG_INFO("Invalid uuid"); + return nullptr; + } + for (const auto &child : _children) { + if (child->_id == uuid) { + return child; + } + } + return nullptr; +} + +bool Node::isChildOf(Node *parent) const { + const Node *child = this; + do { + if (child == parent) { + return true; + } + child = child->_parent; + } while (child); + return false; +} + +void Node::removeAllChildren() { + for (auto i = static_cast(_children.size() - 1); i >= 0; --i) { + if (_children[i]) { + _children[i]->setParent(nullptr); + } + } + _children.clear(); +} + +void Node::setSiblingIndex(index_t index) { + if (!_parent) { + return; + } + if (!!(_parent->_objFlags & Flags::DEACTIVATING)) { + debug::errorID(3821); + return; + } + ccstd::vector> &siblings = _parent->_children; + index = index != -1 ? index : static_cast(siblings.size()) - 1; + index_t oldIdx = getIdxOfChild(siblings, this); + if (index != oldIdx) { + if (oldIdx != CC_INVALID_INDEX) { + siblings.erase(siblings.begin() + oldIdx); + } + if (index < siblings.size()) { + siblings.insert(siblings.begin() + index, this); + } else { + siblings.emplace_back(this); + } + _parent->updateSiblingIndex(); + if (onSiblingIndexChanged != nullptr) { + onSiblingIndexChanged(index); + } + } +} + +Node *Node::getChildByPath(const ccstd::string &path) const { + size_t end = 0; + ccstd::vector segments = StringUtil::split(path, "/"); + auto *lastNode = const_cast(this); + for (const ccstd::string &segment : segments) { + if (segment.empty()) { + continue; + } + Node *next{nullptr}; + if (lastNode) { + for (const auto &child : lastNode->_children) { + if (child->_name == segment) { + next = child; + break; + } + } + lastNode = next; + } else { + break; + } + } + return lastNode; +} + +// +void Node::setPositionInternal(float x, float y, float z, bool calledFromJS) { + _localPosition.set(x, y, z); + invalidateChildren(TransformBit::POSITION); + + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::POSITION); + } + + if (!calledFromJS) { + notifyLocalPositionUpdated(); + } +} + +void Node::setRotationInternal(float x, float y, float z, float w, bool calledFromJS) { + _localRotation.set(x, y, z, w); + _eulerDirty = true; + + invalidateChildren(TransformBit::ROTATION); + + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::ROTATION); + } + + if (!calledFromJS) { + notifyLocalRotationUpdated(); + } +} + +void Node::setRotationFromEuler(float x, float y, float z) { + _euler.set(x, y, z); + Quaternion::fromEuler(x, y, z, &_localRotation); + _eulerDirty = false; + invalidateChildren(TransformBit::ROTATION); + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::ROTATION); + } + + notifyLocalRotationUpdated(); +} + +void Node::setScaleInternal(float x, float y, float z, bool calledFromJS) { + _localScale.set(x, y, z); + + invalidateChildren(TransformBit::SCALE); + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::SCALE); + } + + if (!calledFromJS) { + notifyLocalScaleUpdated(); + } +} + +void Node::updateWorldTransform() { //NOLINT(misc-no-recursion) + if (!getDirtyFlag()) { + return; + } + + index_t i = 0; + Node *curr = this; + Mat3 mat3; + Mat3 m43; + Quaternion quat; + while (curr && curr->getDirtyFlag()) { + setDirtyNode(i++, curr); + curr = curr->getParent(); + } + Node *child{nullptr}; + uint32_t dirtyBits = 0; + while (i) { + child = getDirtyNode(--i); + if (!child) { + continue; + } + dirtyBits |= child->getDirtyFlag(); + auto *currChild = child; + if (curr) { + if (dirtyBits & static_cast(TransformBit::POSITION)) { + currChild->_worldPosition.transformMat4(currChild->_localPosition, curr->_worldMatrix); + currChild->_worldMatrix.m[12] = currChild->_worldPosition.x; + currChild->_worldMatrix.m[13] = currChild->_worldPosition.y; + currChild->_worldMatrix.m[14] = currChild->_worldPosition.z; + } + if (dirtyBits & static_cast(TransformBit::RS)) { + Mat4::fromRTS(currChild->_localRotation, currChild->_localPosition, currChild->_localScale, &currChild->_worldMatrix); + Mat4::multiply(curr->_worldMatrix, currChild->_worldMatrix, &currChild->_worldMatrix); + if (dirtyBits & static_cast(TransformBit::ROTATION)) { + Quaternion::multiply(curr->_worldRotation, currChild->_localRotation, &currChild->_worldRotation); + } + quat = currChild->_worldRotation; + quat.conjugate(); + Mat3::fromQuat(quat, &mat3); + Mat3::fromMat4(currChild->_worldMatrix, &m43); + Mat3::multiply(mat3, m43, &mat3); + currChild->_worldScale.set(mat3.m[0], mat3.m[4], mat3.m[8]); + } + } else if (child) { + if (dirtyBits & static_cast(TransformBit::POSITION)) { + currChild->_worldPosition.set(currChild->_localPosition); + currChild->_worldMatrix.m[12] = currChild->_worldPosition.x; + currChild->_worldMatrix.m[13] = currChild->_worldPosition.y; + currChild->_worldMatrix.m[14] = currChild->_worldPosition.z; + } + if (dirtyBits & static_cast(TransformBit::RS)) { + if (dirtyBits & static_cast(TransformBit::ROTATION)) { + currChild->_worldRotation.set(currChild->_localRotation); + } + if (dirtyBits & static_cast(TransformBit::SCALE)) { + currChild->_worldScale.set(currChild->_localScale); + Mat4::fromRTS(currChild->_worldRotation, currChild->_worldPosition, currChild->_worldScale, &currChild->_worldMatrix); + } + } + } + child->setDirtyFlag(static_cast(TransformBit::NONE)); + curr = child; + } +} + +const Mat4 &Node::getWorldMatrix() const { //NOLINT(misc-no-recursion) + const_cast(this)->updateWorldTransform(); + return _worldMatrix; +} + +Mat4 Node::getWorldRS() { + updateWorldTransform(); + Mat4 target{_worldMatrix}; + target.m[12] = target.m[13] = target.m[14] = 0; + return target; +} + +Mat4 Node::getWorldRT() { + updateWorldTransform(); + Mat4 target; + Mat4::fromRT(_worldRotation, _worldPosition, &target); + return target; +} + +void Node::invalidateChildren(TransformBit dirtyBit) { + auto curDirtyBit{static_cast(dirtyBit)}; + const uint32_t childDirtyBit{curDirtyBit | static_cast(TransformBit::POSITION)}; + setDirtyNode(0, this); + int i{0}; + while (i >= 0) { + Node *cur = getDirtyNode(i--); + if (cur == nullptr) { + continue; + } + + const uint32_t hasChangedFlags = cur->getChangedFlags(); + if (cur->isValid() && (cur->getDirtyFlag() & hasChangedFlags & curDirtyBit) != curDirtyBit) { + cur->setDirtyFlag(cur->getDirtyFlag() | curDirtyBit); + cur->setChangedFlags(hasChangedFlags | curDirtyBit); + + for (Node *curChild : cur->getChildren()) { + setDirtyNode(++i, curChild); + } + } + curDirtyBit = childDirtyBit; + } +} + +void Node::setWorldPosition(float x, float y, float z) { + _worldPosition.set(x, y, z); + if (_parent) { + _parent->updateWorldTransform(); + Mat4 invertWMat{_parent->_worldMatrix}; + invertWMat.inverse(); + _localPosition.transformMat4(_worldPosition, invertWMat); + } else { + _localPosition.set(_worldPosition); + } + notifyLocalPositionUpdated(); + + invalidateChildren(TransformBit::POSITION); + + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::POSITION); + } +} + +const Vec3 &Node::getWorldPosition() const { + const_cast(this)->updateWorldTransform(); + return _worldPosition; +} + +void Node::setWorldRotation(float x, float y, float z, float w) { + _worldRotation.set(x, y, z, w); + if (_parent) { + _parent->updateWorldTransform(); + _localRotation.set(_parent->_worldRotation.getConjugated()); + _localRotation.multiply(_worldRotation); + } else { + _localRotation.set(_worldRotation); + } + + _eulerDirty = true; + + invalidateChildren(TransformBit::ROTATION); + + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::ROTATION); + } + + notifyLocalRotationUpdated(); +} + +const Quaternion &Node::getWorldRotation() const { //NOLINT(misc-no-recursion) + const_cast(this)->updateWorldTransform(); + return _worldRotation; +} + +void Node::setWorldScale(float x, float y, float z) { + _worldScale.set(x, y, z); + if (_parent != nullptr) { + _parent->updateWorldTransform(); + Mat3 mat3; + Mat3::fromQuat(_parent->_worldRotation.getConjugated(), &mat3); + Mat3 b; + Mat3::fromMat4(_parent->_worldMatrix, &b); + Mat3::multiply(mat3, b, &mat3); + Mat3 mat3Scaling; + mat3Scaling.m[0] = _worldScale.x; + mat3Scaling.m[4] = _worldScale.y; + mat3Scaling.m[8] = _worldScale.z; + + mat3.inverse(); + Mat3::multiply(mat3Scaling, mat3, &mat3); + _localScale.x = Vec3{mat3.m[0], mat3.m[1], mat3.m[2]}.length(); + _localScale.y = Vec3{mat3.m[3], mat3.m[4], mat3.m[5]}.length(); + _localScale.z = Vec3{mat3.m[6], mat3.m[7], mat3.m[8]}.length(); + } else { + _localScale = _worldScale; + } + + notifyLocalScaleUpdated(); + + invalidateChildren(TransformBit::SCALE); + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::SCALE); + } +} + +const Vec3 &Node::getWorldScale() const { + const_cast(this)->updateWorldTransform(); + return _worldScale; +} + +void Node::setForward(const Vec3 &dir) { + const float len = dir.length(); + Vec3 v3Temp = dir * (-1.F / len); + Quaternion qTemp{Quaternion::identity()}; + Quaternion::fromViewUp(v3Temp, &qTemp); + setWorldRotation(qTemp); +} + +void Node::setAngle(float val) { + _euler.set(0, 0, val); + Quaternion::createFromAngleZ(val, &_localRotation); + _eulerDirty = false; + invalidateChildren(TransformBit::ROTATION); + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::ROTATION); + } + + notifyLocalRotationUpdated(); +} + +void Node::onSetParent(Node *oldParent, bool keepWorldTransform) { + if (_parent) { + if ((oldParent == nullptr || oldParent->_scene != _parent->_scene) && _parent->_scene != nullptr) { + walk(setScene); + } + } + + if (keepWorldTransform) { + if (_parent) { + _parent->updateWorldTransform(); + if (mathutils::approx(_parent->_worldMatrix.determinant(), 0.F, mathutils::EPSILON)) { + CC_LOG_WARNING("14300"); + _dirtyFlag |= static_cast(TransformBit::TRS); + updateWorldTransform(); + } else { + Mat4 tmpMat4 = _parent->_worldMatrix.getInversed() * _worldMatrix; + Mat4::toRTS(tmpMat4, &_localRotation, &_localPosition, &_localScale); + } + } else { + _localPosition.set(_worldPosition); + _localRotation.set(_worldRotation); + _localScale.set(_worldScale); + } + + notifyLocalPositionRotationScaleUpdated(); + _eulerDirty = true; + } + invalidateChildren(TransformBit::TRS); +} + +void Node::rotate(const Quaternion &rot, NodeSpace ns /* = NodeSpace::LOCAL*/, bool calledFromJS /* = false*/) { + Quaternion qTempA{rot}; + qTempA.normalize(); + if (ns == NodeSpace::LOCAL) { + _localRotation *= qTempA; + } else if (ns == NodeSpace::WORLD) { + Quaternion qTempB{Quaternion::identity()}; + qTempB = qTempA * getWorldRotation(); + qTempA = _worldRotation; + qTempA.inverse(); + qTempB = qTempA * qTempB; + _localRotation = _localRotation * qTempB; + } + _eulerDirty = true; + invalidateChildren(TransformBit::ROTATION); + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::ROTATION); + } + + if (!calledFromJS) { + notifyLocalRotationUpdated(); + } +} + +void Node::lookAt(const Vec3 &pos, const Vec3 &up) { + Vec3 vTemp = getWorldPosition(); + Quaternion qTemp{Quaternion::identity()}; + vTemp -= pos; + vTemp.normalize(); + Quaternion::fromViewUp(vTemp, up, &qTemp); + setWorldRotation(qTemp); +} + +Vec3 Node::inverseTransformPoint(const Vec3 &p) { + Vec3 out; + out.set(p.x, p.y, p.z); + Node *cur{this}; + index_t i{0}; + while (cur != nullptr && cur->getParent()) { + setDirtyNode(i++, cur); + cur = cur->getParent(); + } + while (i >= 0) { + Vec3::transformInverseRTS(out, cur->getRotation(), cur->getPosition(), cur->getScale(), &out); + --i; + cur = getDirtyNode(i); + } + return out; +} + +void Node::setMatrix(const Mat4 &val) { + val.decompose(&_localScale, &_localRotation, &_localPosition); + notifyLocalPositionRotationScaleUpdated(); + + invalidateChildren(TransformBit::TRS); + _eulerDirty = true; + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::TRS); + } +} + +void Node::setWorldRotationFromEuler(float x, float y, float z) { + Quaternion::fromEuler(x, y, z, &_worldRotation); + if (_parent) { + _parent->updateWorldTransform(); + _localRotation = _parent->_worldRotation.getConjugated() * _worldRotation; + } else { + _localRotation = _worldRotation; + } + _eulerDirty = true; + + invalidateChildren(TransformBit::ROTATION); + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::ROTATION); + } + + notifyLocalRotationUpdated(); +} + +void Node::setRTSInternal(Quaternion *rot, Vec3 *pos, Vec3 *scale, bool calledFromJS) { + uint32_t dirtyBit = 0; + if (rot) { + dirtyBit |= static_cast(TransformBit::ROTATION); + _localRotation = *rot; + _eulerDirty = true; + } + if (pos) { + _localPosition = *pos; + dirtyBit |= static_cast(TransformBit::POSITION); + } + if (scale) { + _localScale = *scale; + dirtyBit |= static_cast(TransformBit::SCALE); + } + + if (!calledFromJS) { + notifyLocalPositionRotationScaleUpdated(); + } + + if (dirtyBit) { + invalidateChildren(static_cast(dirtyBit)); + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, dirtyBit); + } + } +} + +void Node::resetChangedFlags() { + globalFlagChangeVersion++; +} + +void Node::clearNodeArray() { + if (clearFrame < clearRound) { + clearFrame++; + } else { + clearFrame = 0; + dirtyNodes.clear(); + } +} + +ccstd::string Node::getPathInHierarchy() const { + ccstd::string result = getName(); + Node *curNode = getParent(); + while (curNode && curNode->getParent()) { + result.insert(0, "/").insert(0, curNode->getName()); + curNode = curNode->getParent(); + } + return result; +} + +void Node::translate(const Vec3 &trans, NodeSpace ns) { + Vec3 v3Temp{trans}; + if (ns == NodeSpace::LOCAL) { + v3Temp.transformQuat(_localRotation); + _localPosition.x += v3Temp.x; + _localPosition.y += v3Temp.y; + _localPosition.z += v3Temp.z; + } else if (ns == NodeSpace::WORLD) { + if (_parent) { + Quaternion qTemp = _parent->getWorldRotation(); + qTemp.inverse(); + v3Temp.transformQuat(qTemp); + Vec3 scale{_worldScale}; + _localPosition.x += v3Temp.x / scale.x; + _localPosition.y += v3Temp.y / scale.y; + _localPosition.z += v3Temp.z / scale.z; + } else { + _localPosition.x += trans.x; + _localPosition.y += trans.y; + _localPosition.z += trans.z; + } + } + + notifyLocalPositionUpdated(); + + invalidateChildren(TransformBit::POSITION); + if (_eventMask & TRANSFORM_ON) { + emit(NodeEventType::TRANSFORM_CHANGED, TransformBit::POSITION); + } +} + +bool Node::onPreDestroy() { + bool result = onPreDestroyBase(); + // TODO(Lenovo): bookOfChange free + return result; +} + +void Node::onHierarchyChanged(Node *oldParent) { + emit(EventTypesToJS::NODE_REATTACH); + _eventProcessor->reattach(); + onHierarchyChangedBase(oldParent); +} + +/* static */ +//Node *Node::find(const ccstd::string &path, Node *referenceNode /* = nullptr*/) { +// return cc::find(path, referenceNode); +//} + +// For deserialization +// void Node::_setChild(index_t i, Node *child) { +// if (i < _children.size()) { +// _children[i] = child; +// } else { +// CC_LOG_ERROR("Invalid index (%d) for Node children (size: %u)", i, static_cast(_children.size())); +// } +//} +// +// Node *Node::_getChild(index_t i) { +// if (i < _children.size()) { +// return _children[i]; +// } +// CC_LOG_ERROR("Invalid index (%d) for Node children (size: %u)", i, static_cast(_children.size())); +// return nullptr; +//} +// +// void Node::_setChildrenSize(uint32_t size) { +// _children.resize(size); +//} +// +// uint32_t Node::_getChildrenSize() { +// return _children.size(); +//} +// +void Node::_setChildren(ccstd::vector> &&children) { + _children = std::move(children); +} + +// + +} // namespace cc diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.h b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.h new file mode 100644 index 0000000..4f364ef --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.h @@ -0,0 +1,861 @@ +/**************************************************************************** + Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#pragma once + +#include "base/Ptr.h" +#include "base/std/any.h" +#include "bindings/utils/BindingUtils.h" +//#include "core/components/Component.h" +//#include "core/event/Event.h" +#include "core/event/EventTypesToJS.h" +#include "core/scene-graph/BaseNode.h" +#include "core/scene-graph/Layers.h" +#include "core/scene-graph/NodeEnum.h" +#include "core/scene-graph/NodeEvent.h" +#include "core/scene-graph/NodeEventProcessor.h" + +#include "math/Mat3.h" +#include "math/Mat4.h" +#include "math/Quaternion.h" +#include "math/Vec3.h" +#include "math/Vec4.h" + +namespace cc { + +class Scene; +class NodeEventProcessor; + +/** + * Event types emitted by Node + */ +using EventType = NodeEventType; +/** + * Bit masks for Node transformation parts + */ +using TransformDirtyBit = TransformBit; + +class Node : public BaseNode { +public: + class UserData : public RefCounted { + public: + ~UserData() override = default; + + protected: + UserData() = default; + }; + + using Super = BaseNode; + + static const uint32_t TRANSFORM_ON; + + static Node *instantiate(Node *cloned, bool isSyncedNode); + static void setScene(Node *); + + /** + * @en Finds a node by hierarchy path, the path is case-sensitive. + * It will traverse the hierarchy by splitting the path using '/' character. + * This function will still returns the node even if it is inactive. + * It is recommended to not use this function every frame instead cache the result at startup. + * @zh 通过路径从节点树中查找节点的方法,路径是大小写敏感的,并且通过 `/` 来分隔节点层级。 + * 即使节点的状态是未启用的也可以找到,建议将结果缓存,而不是每次需要都去查找。 + * @param path The path of the target node + * @param referenceNode If given, the search will be limited in the sub node tree of the reference node + */ + // static Node *find(const ccstd::string &path, Node *referenceNode = nullptr); + + /** + * @en Determine whether the given object is a normal Node. Will return false if [[Scene]] given. + * @zh 指定对象是否是普通的节点?如果传入 [[Scene]] 会返回 false。 + */ + template + static bool isNode(T *obj); + + static void resetChangedFlags(); + static void clearNodeArray(); + + Node(); + explicit Node(const ccstd::string &name); + ~Node() override; + + virtual void onPostActivated(bool active) {} + + void setParent(Node *parent, bool isKeepWorld = false); + + inline Scene *getScene() const { return _scene; }; + + using WalkCallback = std::function; + void walk(const WalkCallback &preFunc); + void walk(const WalkCallback &preFunc, const WalkCallback &postFunc); + + template + void on(const CallbacksInvoker::KeyType &type, void (Target::*memberFn)(Args...), Target *target, bool useCapture = false); + + template + void on(const CallbacksInvoker::KeyType &type, std::function &&callback, CallbackID &cbID, bool useCapture = false); + + template + void on(const CallbacksInvoker::KeyType &type, std::function &&callback, Target *target, CallbackID &cbID, bool useCapture = false); + + template + std::enable_if_t::value, void> + on(const CallbacksInvoker::KeyType &type, LambdaType &&callback, Target *target, CallbackID &cbID, bool useCapture = false); + + template + std::enable_if_t::value, void> + on(const CallbacksInvoker::KeyType &type, LambdaType &&callback, CallbackID &cbID, bool useCapture = false); + + template + void on(const CallbacksInvoker::KeyType &type, std::function &&callback, bool useCapture = false); + + template + void on(const CallbacksInvoker::KeyType &type, std::function &&callback, Target *target, bool useCapture = false); + + template + std::enable_if_t::value, void> + on(const CallbacksInvoker::KeyType &type, LambdaType &&callback, Target *target, bool useCapture = false); + + template + std::enable_if_t::value, void> + on(const CallbacksInvoker::KeyType &type, LambdaType &&callback, bool useCapture = false); + + template + void once(const CallbacksInvoker::KeyType &type, void (Target::*memberFn)(Args...), Target *target, bool useCapture = false); + + template + void once(const CallbacksInvoker::KeyType &type, std::function &&callback, CallbackID &cbID, bool useCapture = false); + + template + void once(const CallbacksInvoker::KeyType &type, std::function &&callback, Target *target, CallbackID &cbID, bool useCapture = false); + + template + std::enable_if_t::value, void> + once(const CallbacksInvoker::KeyType &type, LambdaType &&callback, CallbackID &cbID, bool useCapture = false); + + template + std::enable_if_t::value, void> + once(const CallbacksInvoker::KeyType &type, LambdaType &&callback, Target *target, CallbackID &cbID, bool useCapture = false); + + template + void once(const CallbacksInvoker::KeyType &type, std::function &&callback, bool useCapture = false); + + template + void once(const CallbacksInvoker::KeyType &type, std::function &&callback, Target *target, bool useCapture = false); + + template + std::enable_if_t::value, void> + once(const CallbacksInvoker::KeyType &type, LambdaType &&callback, bool useCapture = false); + + template + std::enable_if_t::value, void> + once(const CallbacksInvoker::KeyType &type, LambdaType &&callback, Target *target, bool useCapture = false); + + void off(const CallbacksInvoker::KeyType &type, bool useCapture = false); + + void off(const CallbacksInvoker::KeyType &type, const CallbackID &cbID, bool useCapture = false); + + void off(const CallbacksInvoker::KeyType &type, void *target, bool useCapture = false); + + template + void off(const CallbacksInvoker::KeyType &type, void (Target::*memberFn)(Args...), Target *target, bool useCapture = false); + + template + void emit(const CallbacksInvoker::KeyType &type, Args &&...args); + + // void dispatchEvent(event::Event *event); + bool hasEventListener(const CallbacksInvoker::KeyType &type) const; + bool hasEventListener(const CallbacksInvoker::KeyType &type, const CallbackID &cbID) const; + bool hasEventListener(const CallbacksInvoker::KeyType &type, void *target) const; + bool hasEventListener(const CallbacksInvoker::KeyType &type, void *target, const CallbackID &cbID) const; + + template + bool hasEventListener(const CallbacksInvoker::KeyType &type, void (Target::*memberFn)(Args...), Target *target) const; + + void targetOff(const CallbacksInvoker::KeyType &type); + + bool destroy() override { + if (CCObject::destroy()) { + setActive(false); + return true; + } + return false; + } + + inline void destroyAllChildren() { + for (const auto &child : _children) { + child->destroy(); + } + } + + inline void updateSiblingIndex() { + index_t i = 0; + for (const auto &child : _children) { + child->_siblingIndex = i++; + } + emit(NodeEventType::SIBLING_ORDER_CHANGED); + } + + inline void addChild(Node *node) { node->setParent(this); } + + inline void removeChild(Node *node) const { + auto idx = getIdxOfChild(_children, node); + if (idx != -1) { + node->setParent(nullptr); + } + } + inline void removeFromParent() { + if (_parent) { + _parent->removeChild(this); + } + } + void removeAllChildren(); + + bool isChildOf(Node *parent) const; + + void setActive(bool isActive); + + void setSiblingIndex(index_t index); + + inline bool isPersistNode() const { + return static_cast(_objFlags & Flags::DONT_DESTROY) > 0; + } + + inline void setPersistNode(bool val) { + val ? _objFlags |= Flags::DONT_DESTROY : _objFlags &= ~Flags::DONT_DESTROY; + } + + inline const ccstd::string &getUuid() const { + return _id; + } + + inline bool isActive() const { return _active != 0; } + + inline bool isActiveInHierarchy() const { return _activeInHierarchy != 0; } + inline void setActiveInHierarchy(bool v) { + _activeInHierarchy = (v ? 1 : 0); + } + + inline const ccstd::vector> &getChildren() const { return _children; } + inline Node *getParent() const { return _parent; } + inline NodeEventProcessor *getEventProcessor() const { return _eventProcessor; } + + Node *getChildByUuid(const ccstd::string &uuid) const; + Node *getChildByName(const ccstd::string &name) const; + Node *getChildByPath(const ccstd::string &path) const; + inline index_t getSiblingIndex() const { return _siblingIndex; } + inline UserData *getUserData() { return _userData.get(); } + inline void setUserData(UserData *data) { _userData = data; } + inline void insertChild(Node *child, index_t siblingIndex) { + child->setParent(this); + child->setSiblingIndex(siblingIndex); + } + + void invalidateChildren(TransformBit dirtyBit); + + void translate(const Vec3 &, NodeSpace ns = NodeSpace::LOCAL); + void rotate(const Quaternion &rot, NodeSpace ns = NodeSpace::LOCAL, bool calledFromJS = false); + inline void rotateForJS(float x, float y, float z, float w, NodeSpace ns = NodeSpace::LOCAL) { + rotate(Quaternion(x, y, z, w), ns, true); + } + void lookAt(const Vec3 &pos, const Vec3 &up = Vec3::UNIT_Y); + + void pauseSystemEvents(bool recursive) {} // cjh TODO: + void resumeSystemEvents(bool recursive) {} // cjh TODO: + + ccstd::string getPathInHierarchy() const; + // =============================== + // transform + // =============================== + + /** + * @en Set position in local coordinate system + * @zh 设置本地坐标 + * @param position Target position + */ + inline void setPosition(const Vec3 &pos) { setPosition(pos.x, pos.y, pos.z); } + inline void setPosition(float x, float y) { setPosition(x, y, _localPosition.z); } + inline void setPosition(float x, float y, float z) { setPositionInternal(x, y, z, false); } + inline void setPositionInternal(float x, float y, bool calledFromJS) { setPositionInternal(x, y, _localPosition.z, calledFromJS); } + void setPositionInternal(float x, float y, float z, bool calledFromJS); + // It is invoked after deserialization. It only sets position value, not triggers other logic. + inline void setPositionForJS(float x, float y, float z) { _localPosition.set(x, y, z); } + /** + * @en Get position in local coordinate system, please try to pass `out` vector and reuse it to avoid garbage. + * @zh 获取本地坐标,注意,尽可能传递复用的 [[Vec3]] 以避免产生垃圾。 + * @param out Set the result to out vector + * @return If `out` given, the return value equals to `out`, otherwise a new vector will be generated and return + */ + inline const Vec3 &getPosition() const { return _localPosition; } + + /** + * @en Set rotation in local coordinate system with a quaternion representing the rotation + * @zh 用四元数设置本地旋转 + * @param rotation Rotation in quaternion + */ + inline void setRotation(const Quaternion &rotation) { setRotation(rotation.x, rotation.y, rotation.z, rotation.w); } + inline void setRotation(float x, float y, float z, float w) { setRotationInternal(x, y, z, w, false); } + void setRotationInternal(float x, float y, float z, float w, bool calledFromJS); + inline void setRotationForJS(float x, float y, float z, float w) { _localRotation.set(x, y, z, w); } + + inline void setEulerAngles(const Vec3 &val) { setRotationFromEuler(val.x, val.y, val.z); } + inline void setRotationFromEuler(const Vec3 &val) { setRotationFromEuler(val.x, val.y, val.z); } + inline void setRotationFromEuler(float x, float y) { setRotationFromEuler(x, y, _euler.z); } + void setRotationFromEuler(float x, float y, float z); + inline void setRotationFromEulerForJS(float x, float y, float z) { _euler.set(x, y, z); } + /** + * @en Get rotation as quaternion in local coordinate system, please try to pass `out` quaternion and reuse it to avoid garbage. + * @zh 获取本地旋转,注意,尽可能传递复用的 [[Quat]] 以避免产生垃圾。 + * @param out Set the result to out quaternion + * @return If `out` given, the return value equals to `out`, otherwise a new quaternion will be generated and return + */ + inline const Quaternion &getRotation() const { return _localRotation; } + + /** + * @en Set scale in local coordinate system + * @zh 设置本地缩放 + * @param scale Target scale + */ + inline void setScale(const Vec3 &scale) { setScale(scale.x, scale.y, scale.z); } + inline void setScale(float x, float y) { setScale(x, y, _localScale.z); } + inline void setScale(float x, float y, float z) { setScaleInternal(x, y, z, false); } + inline void setScaleInternal(float x, float y, bool calledFromJS) { setScaleInternal(x, y, _localScale.z, calledFromJS); } + void setScaleInternal(float x, float y, float z, bool calledFromJS); + inline void setScaleForJS(float x, float y, float z) { _localScale.set(x, y, z); } + /** + * @en Get scale in local coordinate system, please try to pass `out` vector and reuse it to avoid garbage. + * @zh 获取本地缩放,注意,尽可能传递复用的 [[Vec3]] 以避免产生垃圾。 + * @param out Set the result to out vector + * @return If `out` given, the return value equals to `out`, otherwise a new vector will be generated and return + */ + inline const Vec3 &getScale() const { return _localScale; } + + /** + * @en Inversely transform a point from world coordinate system to local coordinate system. + * @zh 逆向变换一个空间点,一般用于将世界坐标转换到本地坐标系中。 + * @param p A position in world coordinate system + * @return The result point in local coordinate system will be stored in this vector + */ + Vec3 inverseTransformPoint(const Vec3 &p); + + /** + * @en Set position in world coordinate system + * @zh 设置世界坐标 + * @param position Target position + */ + inline void setWorldPosition(const Vec3 &pos) { setWorldPosition(pos.x, pos.y, pos.z); } + void setWorldPosition(float x, float y, float z); + + /** + * @en Get position in world coordinate system, please try to pass `out` vector and reuse it to avoid garbage. + * @zh 获取世界坐标,注意,尽可能传递复用的 [[Vec3]] 以避免产生垃圾。 + * @param out Set the result to out vector + * @return If `out` given, the return value equals to `out`, otherwise a new vector will be generated and return + */ + const Vec3 &getWorldPosition() const; + + /** + * @en Set rotation in world coordinate system with a quaternion representing the rotation + * @zh 用四元数设置世界坐标系下的旋转 + * @param rotation Rotation in quaternion + */ + inline void setWorldRotation(const Quaternion &rotation) { setWorldRotation(rotation.x, rotation.y, rotation.z, rotation.w); } + void setWorldRotation(float x, float y, float z, float w); + /** + * @en Get rotation as quaternion in world coordinate system, please try to pass `out` quaternion and reuse it to avoid garbage. + * @zh 获取世界坐标系下的旋转,注意,尽可能传递复用的 [[Quat]] 以避免产生垃圾。 + * @param out Set the result to out quaternion + * @return If `out` given, the return value equals to `out`, otherwise a new quaternion will be generated and return + */ + const Quaternion &getWorldRotation() const; + + /** + * @en Set rotation in world coordinate system with euler angles + * @zh 用欧拉角设置世界坐标系下的旋转 + * @param x X axis rotation + * @param y Y axis rotation + * @param z Z axis rotation + */ + inline void setWorldScale(const Vec3 &scale) { setWorldScale(scale.x, scale.y, scale.z); } + void setWorldScale(float x, float y, float z); + + /** + * @en Get scale in world coordinate system, please try to pass `out` vector and reuse it to avoid garbage. + * @zh 获取世界缩放,注意,尽可能传递复用的 [[Vec3]] 以避免产生垃圾。 + * @param out Set the result to out vector + * @return If `out` given, the return value equals to `out`, otherwise a new vector will be generated and return + */ + const Vec3 &getWorldScale() const; + + void setWorldRotationFromEuler(float x, float y, float z); + + /** + * @en Local transformation matrix + * @zh 本地坐标系变换矩阵 + */ + void setMatrix(const Mat4 &val); + + /** + * @en Update the world transform information if outdated + * @zh 更新节点的世界变换信息 + */ + void updateWorldTransform(); + + /** + * @en Get a world transform matrix + * @zh 获取世界变换矩阵 + * @param out Set the result to out matrix + * @return If `out` given, the return value equals to `out`, otherwise a new matrix will be generated and return + */ + const Mat4 &getWorldMatrix() const; + + /** + * @en Get a world transform matrix with only rotation and scale + * @zh 获取只包含旋转和缩放的世界变换矩阵 + * @param out Set the result to out matrix + * @return If `out` given, the return value equals to `out`, otherwise a new matrix will be generated and return + */ + Mat4 getWorldRS(); + + /** + * @en Get a world transform matrix with only rotation and translation + * @zh 获取只包含旋转和位移的世界变换矩阵 + * @param out Set the result to out matrix + * @return If `out` given, the return value equals to `out`, otherwise a new matrix will be generated and return + */ + Mat4 getWorldRT(); + + /** + * @en Set local transformation with rotation, position and scale separately. + * @zh 一次性设置所有局部变换(平移、旋转、缩放)信息 + * @param rot The rotation + * @param pos The position + * @param scale The scale + */ + void setRTSInternal(Quaternion *rot, Vec3 *pos, Vec3 *scale, bool calledFromJS); + inline void setRTS(Quaternion *rot, Vec3 *pos, Vec3 *scale) { setRTSInternal(rot, pos, scale, false); } + + void setForward(const Vec3 &dir); + + void setAngle(float); + + inline const Vec3 &getEulerAngles() { + if (_eulerDirty) { + Quaternion::toEuler(_localRotation, false, &_euler); + _eulerDirty = false; + } + return _euler; + } + + inline float getAngle() const { + return _euler.z; + } + + inline Vec3 getForward() const { + Vec3 forward{0, 0, -1}; + forward.transformQuat(getWorldRotation()); + return forward; + } + + inline Vec3 getUp() const { + Vec3 up{0, 1, 0}; + up.transformQuat(getWorldRotation()); + return up; + } + + inline Vec3 getRight() const { + Vec3 right{1, 0, 0}; + right.transformQuat(getWorldRotation()); + return right; + } + + inline bool isStatic() const { + return _isStatic != 0; + } + + inline void setStatic(bool v) { + _isStatic = v ? 1 : 0; + } + + /** + * @en Whether the node's transformation have changed during the current frame. + * @zh 这个节点的空间变换信息在当前帧内是否有变过? + */ + inline uint32_t getChangedFlags() const { + return _hasChangedFlagsVersion == globalFlagChangeVersion ? _hasChangedFlags : 0; + } + inline void setChangedFlags(uint32_t value) { + _hasChangedFlagsVersion = globalFlagChangeVersion; + _hasChangedFlags = value; + } + + inline void setDirtyFlag(uint32_t value) { _dirtyFlag = value; } + inline uint32_t getDirtyFlag() const { return _dirtyFlag; } + inline void setLayer(uint32_t layer) { + _layer = layer; + emit(NodeEventType::LAYER_CHANGED, layer); + } + inline uint32_t getLayer() const { return _layer; } + + inline float getUISortingPriority() const { return _uiSortingPriority; } + + inline bool isUISortingEnabled() const { return _uiSortingEnabled != 0; } + + // inline NodeUiProperties *getUIProps() const { return _uiProps.get(); } + + // // ------------------ Component code start ----------------------------- + // // TODO(Lenovo): + // + // template ::value>> + // static Component *findComponent(Node * /*node*/) { + // // cjh TODO: + // CC_ASSERT(false); + // return nullptr; + // } + // + // template ::value>> + // static Component *findComponents(Node * /*node*/, const ccstd::vector & /*components*/) { + // // cjh TODO: + // CC_ASSERT(false); + // return nullptr; + // } + // + // template ::value>> + // static Component *findChildComponent(const ccstd::vector & /*children*/) { + // // cjh TODO: + // CC_ASSERT(false); + // return nullptr; + // } + // + // template ::value>> + // static void findChildComponents(const ccstd::vector & /*children*/, ccstd::vector & /*components*/) { + // // cjh TODO: + // CC_ASSERT(false); + // } + // + // template , T>> + // T *addComponent() { + // T *comp = new T(); + // return static_cast(addComponent(comp)); + // } + // + // template ::value>> + // void removeComponent() { + // for (auto iter = _components.begin(); iter != _components.end(); ++iter) { + // if (dynamic_cast(*iter) != nullptr) { + // _components.erase(iter); + // } + // } + // } + // + // Component *addComponent(Component *comp); + // void removeComponent(Component *comp); + // + // template ::value>> + // Component *getComponent() const { + // for (auto *component : _components) { + // if (dynamic_cast(component) != nullptr) { + // return component; + // } + // } + // return nullptr; + // } + // + // // TODO(Lenovo): + // template ::value>> + // ccstd::vector getComponents() const { + // // cjh TODO: + // CC_ASSERT(false); + // return {}; + // }; + // + // template ::value>> + // Component *getComponentInChildren(const T & /*comp*/) const { + // // cjh TODO: + // CC_ASSERT(false); + // return nullptr; + // } + // + // template ::value>> + // ccstd::vector getComponentsInChildren() const { + // // cjh TODO: + // CC_ASSERT(false); + // return {}; + // } + // + // inline ccstd::vector getComponents() const { return _components; } + // + // void checkMultipleComp(Component *comp) {} + // ccstd::vector _components; + // + // friend void componentCorrupted(Node *node, Component *comp, uint32_t index); + // ------------------ Component code end ----------------------------- + + // For deserialization + // void _setChild(index_t i, Node *child); + // Node * _getChild(index_t i); + // void _setChildrenSize(uint32_t size); + // uint32_t _getChildrenSize(); + void _setChildren(ccstd::vector> &&children); // NOLINT + + inline se::Object *_getSharedArrayBufferObject() const { return _sharedMemoryActor.getSharedArrayBufferObject(); } // NOLINT + + bool onPreDestroy() override; + bool onPreDestroyBase(); + + std::function onSiblingIndexChanged{nullptr}; + // For deserialization + ccstd::string _id; + Node *_parent{nullptr}; + +private: + static index_t getIdxOfChild(const ccstd::vector> &, Node *); + + virtual void onBatchCreated(bool dontChildPrefab); + virtual void updateScene(); + + void onSetParent(Node *oldParent, bool keepWorldTransform); + void onHierarchyChanged(Node *); + void onHierarchyChangedBase(Node *oldParent); + + inline void notifyLocalPositionUpdated() { + emit(EventTypesToJS::NODE_LOCAL_POSITION_UPDATED, _localPosition.x, _localPosition.y, _localPosition.z); + } + + inline void notifyLocalRotationUpdated() { + emit(EventTypesToJS::NODE_LOCAL_ROTATION_UPDATED, _localRotation.x, _localRotation.y, _localRotation.z, _localRotation.w); + } + + inline void notifyLocalScaleUpdated() { + emit(EventTypesToJS::NODE_LOCAL_SCALE_UPDATED, _localScale.x, _localScale.y, _localScale.z); + } + + inline void notifyLocalPositionRotationScaleUpdated() { + emit(EventTypesToJS::NODE_LOCAL_POSITION_ROTATION_SCALE_UPDATED, + _localPosition.x, _localPosition.y, _localPosition.z, + _localRotation.x, _localRotation.y, _localRotation.z, _localRotation.w, + _localScale.x, _localScale.y, _localScale.z); + } + +#if CC_EDITOR + inline void notifyEditorAttached(bool attached) { + emit(EventTypesToJS::NODE_EDITOR_ATTACHED, attached); + } +#endif + + // increase on every frame, used to identify the frame + static uint32_t globalFlagChangeVersion; + + static uint32_t clearFrame; + static uint32_t clearRound; + + Scene *_scene{nullptr}; + NodeEventProcessor *_eventProcessor{nullptr}; + IntrusivePtr _userData; + + ccstd::vector> _children; + bindings::NativeMemorySharedToScriptActor _sharedMemoryActor; + // local transform + Vec3 _localPosition{Vec3::ZERO}; + Vec3 _localScale{Vec3::ONE}; + Quaternion _localRotation{Quaternion::identity()}; + // world transform + Vec3 _worldPosition{Vec3::ZERO}; + Vec3 _worldScale{Vec3::ONE}; + Vec3 _euler{0, 0, 0}; + Quaternion _worldRotation{Quaternion::identity()}; + Mat4 _worldMatrix{Mat4::IDENTITY}; + + // Shared memory with JS + // NOTE: TypeArray created in node.jsb.ts _ctor should have the same memory layout + uint32_t _eventMask{0}; // Uint32: 0 + uint32_t _layer{static_cast(Layers::LayerList::DEFAULT)}; // Uint32: 1 + uint32_t _dirtyFlag{0}; // Uint32: 2 + index_t _siblingIndex{0}; // Int32: 0 + float _uiSortingPriority{0.0F}; // Float: 0 + uint8_t _activeInHierarchy{0}; // Uint8: 0 + uint8_t _active{1}; // Uint8: 1 + uint8_t _isStatic{0}; // Uint8: 2 + uint8_t _uiSortingEnabled{0}; // Uint8: 3 + + /* set _hasChangedFlagsVersion to globalFlagChangeVersion when `_hasChangedFlags` updated. + * `globalFlagChangeVersion == _hasChangedFlagsVersion` means that "_hasChangedFlags is dirty in current frametime". + */ + uint32_t _hasChangedFlagsVersion{0}; + uint32_t _hasChangedFlags{0}; + + bool _eulerDirty{false}; + + friend class NodeActivator; + friend class Scene; + + CC_DISALLOW_COPY_MOVE_ASSIGN(Node); +}; + +template +bool Node::isNode(T *obj) { + return dynamic_cast(obj) != nullptr && dynamic_cast(obj) == nullptr; +} + +template +void Node::emit(const CallbacksInvoker::KeyType &type, Args &&...args) { + _eventProcessor->emit(type, std::forward(args)...); +} + +template +void Node::on(const CallbacksInvoker::KeyType &type, void (Target::*memberFn)(Args...), Target *target, bool useCapture) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask |= TRANSFORM_ON; + } + _eventProcessor->on(type, memberFn, target, useCapture); +} + +template +void Node::on(const CallbacksInvoker::KeyType &type, std::function &&callback, CallbackID &cbID, bool useCapture) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask |= TRANSFORM_ON; + } + _eventProcessor->on(type, std::forward>(callback), cbID, useCapture); +} + +template +void Node::on(const CallbacksInvoker::KeyType &type, std::function &&callback, Target *target, CallbackID &cbID, bool useCapture) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask |= TRANSFORM_ON; + } + _eventProcessor->on(type, std::forward>(callback), target, cbID, useCapture); +} + +template +std::enable_if_t::value, void> +Node::on(const CallbacksInvoker::KeyType &type, LambdaType &&callback, Target *target, CallbackID &cbID, bool useCapture) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask |= TRANSFORM_ON; + } + _eventProcessor->on(type, callback, target, cbID, useCapture); +} + +template +std::enable_if_t::value, void> +Node::on(const CallbacksInvoker::KeyType &type, LambdaType &&callback, CallbackID &cbID, bool useCapture) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask |= TRANSFORM_ON; + } + _eventProcessor->on(type, callback, cbID, useCapture); +} + +template +void Node::on(const CallbacksInvoker::KeyType &type, std::function &&callback, bool useCapture) { + CallbackID unusedID{0}; + on(type, callback, unusedID, useCapture); +} + +template +void Node::on(const CallbacksInvoker::KeyType &type, std::function &&callback, Target *target, bool useCapture) { + CallbackID unusedID{0}; + on(type, callback, target, unusedID, useCapture); +} + +template +std::enable_if_t::value, void> +Node::on(const CallbacksInvoker::KeyType &type, LambdaType &&callback, Target *target, bool useCapture) { + CallbackID unusedID{0}; + on(type, callback, target, unusedID, useCapture); +} + +template +std::enable_if_t::value, void> +Node::on(const CallbacksInvoker::KeyType &type, LambdaType &&callback, bool useCapture) { + CallbackID unusedID{0}; + on(type, callback, unusedID, useCapture); +} +template +void Node::once(const CallbacksInvoker::KeyType &type, void (Target::*memberFn)(Args...), Target *target, bool useCapture) { + _eventProcessor->once(type, memberFn, target, useCapture); +} +template +void Node::once(const CallbacksInvoker::KeyType &type, std::function &&callback, CallbackID &cbID, bool useCapture) { + _eventProcessor->once(type, callback, cbID, useCapture); +} + +template +void Node::once(const CallbacksInvoker::KeyType &type, std::function &&callback, Target *target, CallbackID &cbID, bool useCapture) { + _eventProcessor->once(type, std::forward>(callback), target, cbID, useCapture); +} + +template +std::enable_if_t::value, void> +Node::once(const CallbacksInvoker::KeyType &type, LambdaType &&callback, CallbackID &cbID, bool useCapture) { + _eventProcessor->once(type, callback, cbID, useCapture); +} + +template +std::enable_if_t::value, void> +Node::once(const CallbacksInvoker::KeyType &type, LambdaType &&callback, Target *target, CallbackID &cbID, bool useCapture) { + _eventProcessor->once(type, callback, target, cbID, useCapture); +} + +template +void Node::once(const CallbacksInvoker::KeyType &type, std::function &&callback, bool useCapture) { + CallbackID unusedID{0}; + once(type, callback, unusedID, useCapture); +} + +template +void Node::once(const CallbacksInvoker::KeyType &type, std::function &&callback, Target *target, bool useCapture) { + CallbackID unusedID{0}; + once(type, callback, target, unusedID, useCapture); +} + +template +std::enable_if_t::value, void> +Node::once(const CallbacksInvoker::KeyType &type, LambdaType &&callback, bool useCapture) { + CallbackID unusedID{0}; + once(type, callback, unusedID, useCapture); +} + +template +std::enable_if_t::value, void> +Node::once(const CallbacksInvoker::KeyType &type, LambdaType &&callback, Target *target, bool useCapture) { + CallbackID unusedID{0}; + once(type, callback, target, unusedID, useCapture); +} + +template +void Node::off(const CallbacksInvoker::KeyType &type, void (Target::*memberFn)(Args...), Target *target, bool useCapture) { + _eventProcessor->off(type, memberFn, target, useCapture); + bool hasListeners = _eventProcessor->hasEventListener(type); + if (!hasListeners) { + if (type == NodeEventType::TRANSFORM_CHANGED) { + _eventMask &= ~TRANSFORM_ON; + } + } +} + +template +bool Node::hasEventListener(const CallbacksInvoker::KeyType &type, void (Target::*memberFn)(Args...), Target *target) const { + return _eventProcessor->hasEventListener(type, memberFn, target); +} + +} // namespace cc diff --git a/3.6.3/native/engine/lcc-ui-sorting-group-native/readme.txt b/3.6.3/native/engine/lcc-ui-sorting-group-native/readme.txt new file mode 100644 index 0000000..f648d66 --- /dev/null +++ b/3.6.3/native/engine/lcc-ui-sorting-group-native/readme.txt @@ -0,0 +1,7 @@ +当前版本: cocos creator 3.6.3 + +涉及源文件: +cocos/2d/renderer/Batcher2d.h +cocos/2d/renderer/Batcher2d.cpp +cocos/2d/renderer/RenderEntity.h +cocos/2d/renderer/RenderEntity.cpp