Commit Graph

5831 Commits

Author SHA1 Message Date
hyde zhou 92f2d08f52 [develop] update layout graph loading (#13368) 2022-11-18 13:43:18 +08:00
江战 de020726e4 fix mouse wheel event (#13434) 2022-11-18 13:33:01 +08:00
Cocos Robot d05b25988b [ci skip][AUTO]: Automated code generating update: ae5cf94e422ef93d72105b5d60ff75802012ef68 (#13425) (#13432)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-18 13:32:07 +08:00
James Chen 32a6aba4fb Fix some swig warnings and fix the issue that Node::mobility is not bound, update swig to 4.1.0 release (#13425)
* Update swig config, fix some warnings

* Update TextureBase.h, don't make _width, _height public

* Revert genbindings.js

* Update external to develop-8
2022-11-18 11:56:09 +08:00
mmyduckx 4683ab1e87 Do not support blob in native (#13402)
* xhr do not support blob
2022-11-18 10:36:08 +08:00
王凯鹏 a8652162e0 support Windows and Mac platform for editor (#13394) 2022-11-16 18:06:25 +08:00
hyde zhou c8be7a4008 [develop] export LayoutGraphData to editor (#13377) 2022-11-16 14:56:00 +08:00
Yiwen 924e5a14d7 apply an offset to WrapprtObjectID so that we can use 0 to represent null (world frame) (#13391) 2022-11-16 10:44:04 +08:00
江战 f23d9ed112 fix crash (#13390) 2022-11-15 19:19:38 +08:00
oahc09 511864b15c fix:Downloader-java.cpp 's jni method nativeOnProgress/nativeOnFinish parameter type error (#13328)
* fix:jni method nativeOnProgress/nativeOnFinish second parameter type not right
java static method use jclass
java member method use jobject

* fix:android clang tidy problem
2022-11-15 17:36:42 +08:00
江战 303d5a66db fix physcs (#13302) 2022-11-15 15:24:48 +08:00
Ling Zhan 5ee54d97ff Curve raycast (#13086)
* PhysicsSystem add line-segments-raycast

* 规范接口注释

* PhysicsRayResult add id property

* tweak

* tweak

* 接口命名

* tweak

* native

* add PhysicsLineStripCastResult

* tweak

* tweak
2022-11-15 13:47:52 +08:00
Cocos Robot ad37ef780e [ci skip][AUTO]: Automated code generating update: da22194c08da24c1007b19b6c3d86d7c889b4aad (#13220) (#13372)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-15 09:43:59 +08:00
hyde zhou 3ad97c9879 turn off auto barrier (#13369) 2022-11-14 18:27:01 +08:00
江战 b157bb9454 Support to map multiple se objects with same address (#13220) 2022-11-14 18:12:59 +08:00
徐兵 b2b0d09e1d reflection probe planar reflection for native engine (#13281) 2022-11-14 17:37:11 +08:00
Cocos Robot bdaeef7e71 [ci skip][AUTO]: Automated code generating update: 7f81a38d8f84b876cd4d0a6423481d1cee72e4a4 (#13360) (#13365)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-14 17:26:33 +08:00
fqamic 71314f0e81 merge xr platform function codes (#13360)
* feat: add xr settings for xrEnv and xrType

* improve: remove redundant code for xr interaction

* improve: remove redundant code for frameMove

* fix: xr jsb bind adapt to swig

* feat: adapt to xr preview mode, add handle simulation event
2022-11-14 17:12:25 +08:00
Cocos Robot 3beed0199e [ci skip][AUTO]: Automated code generating update: 1c29d75bc325698dc194714ea02c9fb1d7da8382 (#13356) (#13357)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-14 11:57:20 +08:00
James Chen 62d8b4daae Remove unused swapWindow methods. (#13356)
The operation of swapping (presenting) buffers is done in gfx::Device::present. To swap multi-systemwindows, multiple gfx swapchains need be created, and relevant gfx backend will iterate each swapchain and present them. Therefore, `swap buffers` operation doesn't need to be in SystemWindow or SystemWindowManager.

```c++
void GLES3Device::present() {
    CC_PROFILE(GLES3DevicePresent);
    auto *queue = static_cast<GLES3Queue *>(_queue);
    _numDrawCalls = queue->_numDrawCalls;
    _numInstances = queue->_numInstances;
    _numTriangles = queue->_numTriangles;

    bool isGFXDeviceNeedsPresent = _xr ? _xr->isGFXDeviceNeedsPresent(_api) : true;
    for (auto *swapchain : _swapchains) { // We iterate each swapchain and do the present thing here.
        if (isGFXDeviceNeedsPresent) _gpuContext->present(swapchain);
    }
    if (_xr) _xr->postGFXDevicePresent(_api);

    // Clear queue stats
    queue->_numDrawCalls = 0;
    queue->_numInstances = 0;
    queue->_numTriangles = 0;
}
```

Besides, `SDL_GL_SwapWindow` invocation is doing nothing on Windows & Linux platforms, it will generate an SDL an error that `The specified window isn't an OpenGL window` because GL context is not created by SDL_GL_CreateContext. We create contexts in our gfx code.

https://github.com/libsdl-org/SDL/blob/main/src/video/SDL_video.c#L4192

```c++

#define NOT_AN_OPENGL_WINDOW "The specified window isn't an OpenGL window"
int
SDL_GL_SwapWindowWithResult(SDL_Window * window)
{
    CHECK_WINDOW_MAGIC(window, -1);

    if (!(window->flags & SDL_WINDOW_OPENGL)) {
        return SDL_SetError(NOT_AN_OPENGL_WINDOW);
    }

    if (SDL_GL_GetCurrentWindow() != window) {
        return SDL_SetError("The specified window has not been made current");
    }

    return _this->GL_SwapWindow(_this, window);
}

void
SDL_GL_SwapWindow(SDL_Window * window)
{
    SDL_GL_SwapWindowWithResult(window);
}
```

Also, SDL_GL_SwapWindow could not take any effect if running on gfx Vulkan backend.

```c++
void SDLHelper::swapWindow(SDL_Window *window) {
    SDL_GL_SwapWindow(window);
}
```
2022-11-14 11:46:58 +08:00
李吉林 7a32e653cb remove component related code from native (#13352)
* remove component related code from native
2022-11-14 11:34:42 +08:00
jk20012001 652bf03964 Fix model updateInstancedAttribute binding (#13348) 2022-11-14 11:27:05 +08:00
Cocos Robot 49642f905e [ci skip][AUTO]: Automated code generating update: a49ba79e5529f1b51483cb7fdfad619dee711964 (#13209) (#13354)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-14 10:49:52 +08:00
Yiwen b0e9b0bda0 support fixed constraint (#13209)
* support fixed constraint

* fix typo

* fix typo

* add missing files, clean code

* update cocos/bullet version, remove unused file

* update package version

* update package lock

* fix issues
2022-11-14 10:15:45 +08:00
oahc09 3108c93e36 feat:add libxrcommon module (#13346) 2022-11-14 09:52:11 +08:00
Cocos Robot 34597ce385 [ci skip][AUTO]: Automated code generating update: 43ce5aed485fe6ab0884b83dec6b9d428a4b9b77 (#13270) (#13351)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-11 22:59:36 +08:00
hyde zhou d33798f895 [develop] update native pipeline (#13270) 2022-11-11 22:51:31 +08:00
Ling Zhan 1aad162030 [fix] [physx-backend] Dynamically setting the convex property of the MeshCollider after rigid body generation has no effect #12048 (#13312) 2022-11-11 08:44:25 +08:00
李吉林 3d7beff293 support instancing for light probe (#13324) 2022-11-10 18:09:42 +08:00
Cocos Robot 8642fd7e2e [ci skip][AUTO]: Automated code generating update: c25a2574b93d6805bfcb9d55f3aae08102335be7 (#13317) (#13320)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-10 16:23:51 +08:00
yangchao 22ed6f4c2f force convert localstorge setitem value to string (#13317) 2022-11-10 16:15:30 +08:00
江战 9894dca7d6 fix bindings (#13316) 2022-11-10 16:11:24 +08:00
James Chen 5bf6be8694 [feature] se::Object supports to create and modify ES6 Map/Set (#13275) 2022-11-10 15:20:22 +08:00
Zeqiang Li 59e9b1335f add renderer/vendor/device name for metal (#13301)
* add renderer/vendor/device name for metal
2022-11-10 13:49:15 +08:00
江战 376f0ca284 use std array to store event listeners (#13283)
* use std array to store event listeners

* fix offAll

* make code debuggable

* make code debuggable

* rename to DECLARE_TARGET_EVENT_BEGIN_WITH_PARENTS
2022-11-10 11:00:33 +08:00
James Chen cf8675a949 fixed #13232: [feature] Support to pass commandline arguments to JS (#13268)
* [feature] Support to pass arguments to execution file and export them to JS ( native.process.argv ) .
2022-11-10 09:47:28 +08:00
Yiwen d34ce17a70 PhysX backend use SphericalJoint as its Point2point implementation. (#13245)
* use the correct joint type in PhysX backend

* update
2022-11-10 08:44:18 +08:00
Cocos Robot 161ccf1f8e [ci skip][AUTO]: Automated code generating update: 838eaa1e5e07576c42b27ef25c7be6f2dff3e04c (#13247) (#13289)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-09 15:07:43 +08:00
oahc09 70b81a9d8c [feature] xr remote preview (#13247)
* feat:add xr remote preview feature

send xr device's pose info to web browser or editor

* feat:add xr remote preview feature

* fix:clang tidy error
2022-11-09 15:02:12 +08:00
hyde zhou 60e0bff144 fix msvc NOMINMAX (#13276) 2022-11-09 13:32:20 +08:00
yangchao 1e0a0f219a fix : jni api hidden on android release version (#13267) 2022-11-08 16:23:29 +08:00
GengineJS b8dec5fe95 The clearCameras function of renderwindow removes destroy logic (#13273) 2022-11-08 16:22:54 +08:00
Cocos Robot db2a12a2d0 [ci skip][AUTO]: Automated code generating update: 792aec0a9c57a6a1d2dc6b3a0f53d18df930937f (#13158) (#13269)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-08 13:26:31 +08:00
hyde zhou 87cff94d16 [develop] web-pipeline updated (#13158) 2022-11-08 12:48:30 +08:00
江战 db8c0dda7d fix setWorldScale (#12988) 2022-11-08 11:05:26 +08:00
Cocos Robot 2ba47f986b [ci skip][AUTO]: Automated code generating update: c9aeaa7b093416ccb733e14ebd96f02b47c3a9bb (#13257) (#13264)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-11-08 10:34:15 +08:00
Yiwen 214d6ac17f add a new method to obtain the glTexture handle (#13257) 2022-11-08 10:28:48 +08:00
santy-wang be5454309e Merge branch 'develop' of github.com:cocos-creator/engine into develop 2022-11-07 15:30:11 +08:00
王凯鹏 7f7d85c9d7 Fix native engine bugs in editor (#13242) 2022-11-07 15:04:02 +08:00
santy-wang a8913f5f16 Merge branch 'v3.6.2' of github.com:cocos-creator/engine into develop 2022-11-07 14:19:59 +08:00