mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 09:32:38 +08:00
afd22296b4
* Cpp MIT license update and to date * TS MIT license update and to date
1134 lines
35 KiB
C++
1134 lines
35 KiB
C++
// clang-format off
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
* This file was automatically generated by SWIG (https://www.swig.org).
|
|
* Version 4.1.0
|
|
*
|
|
* Do not make changes to this file unless you know what you are doing - modify
|
|
* the SWIG interface file instead.
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
/****************************************************************************
|
|
Copyright (c) 2022-2023 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 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.
|
|
****************************************************************************/
|
|
|
|
#if defined(__clang__)
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic ignored "-Wunused-variable"
|
|
#elif defined(__GNUC__) || defined(__GNUG__)
|
|
#pragma GCC diagnostic push
|
|
#pragma GCC diagnostic ignored "-Wunused-variable"
|
|
#elif defined(_MSC_VER)
|
|
#pragma warning(push)
|
|
#pragma warning(disable : 4101)
|
|
#endif
|
|
|
|
|
|
#define SWIG_STD_MOVE(OBJ) std::move(OBJ)
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
#include "bindings/jswrapper/SeApi.h"
|
|
#include "bindings/manual/jsb_conversions.h"
|
|
#include "bindings/manual/jsb_global.h"
|
|
|
|
|
|
#include "bindings/auto/jsb_xr_auto.h"
|
|
|
|
|
|
|
|
se::Class* __jsb_cc_xr_XrEntry_class = nullptr;
|
|
se::Object* __jsb_cc_xr_XrEntry_proto = nullptr;
|
|
SE_DECLARE_FINALIZE_FUNC(js_delete_cc_xr_XrEntry)
|
|
|
|
static bool js_cc_xr_XrEntry_getInstance_static(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *result = 0 ;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
result = (cc::xr::XrEntry *)cc::xr::XrEntry::getInstance();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getInstance_static)
|
|
|
|
static bool js_cc_xr_XrEntry_destroyInstance_static(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
cc::xr::XrEntry::destroyInstance();
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_destroyInstance_static)
|
|
|
|
static bool js_cc_xr_XrEntry_createXrInstance(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
char *arg2 = (char *) NULL ;
|
|
ccstd::string temp2 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &temp2);
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
arg2 = (char *) temp2.c_str();
|
|
(arg1)->createXrInstance((char const *)arg2);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_createXrInstance)
|
|
|
|
static bool js_cc_xr_XrEntry_pauseXrInstance(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
(arg1)->pauseXrInstance();
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_pauseXrInstance)
|
|
|
|
static bool js_cc_xr_XrEntry_resumeXrInstance(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
(arg1)->resumeXrInstance();
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_resumeXrInstance)
|
|
|
|
static bool js_cc_xr_XrEntry_destroyXrInstance(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
(arg1)->destroyXrInstance();
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_destroyXrInstance)
|
|
|
|
static bool js_cc_xr_XrEntry_getXrViewCount(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (int)(arg1)->getXrViewCount();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getXrViewCount)
|
|
|
|
static bool js_cc_xr_XrEntry_initXrSwapchains(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
(arg1)->initXrSwapchains();
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_initXrSwapchains)
|
|
|
|
static bool js_cc_xr_XrEntry_isCreatedXrInstance(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
bool result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (bool)(arg1)->isCreatedXrInstance();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_isCreatedXrInstance)
|
|
|
|
static bool js_cc_xr_XrEntry_setXrFrameBuffer(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
unsigned int arg2 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
(arg1)->setXrFrameBuffer(arg2);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setXrFrameBuffer)
|
|
|
|
static bool js_cc_xr_XrEntry_getXrFrameBuffer(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
unsigned int result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (unsigned int)(arg1)->getXrFrameBuffer();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getXrFrameBuffer)
|
|
|
|
static bool js_cc_xr_XrEntry_attachXrFramebufferTexture2D(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
(arg1)->attachXrFramebufferTexture2D();
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_attachXrFramebufferTexture2D)
|
|
|
|
static bool js_cc_xr_XrEntry_isSessionRunning(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
bool result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (bool)(arg1)->isSessionRunning();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_isSessionRunning)
|
|
|
|
static bool js_cc_xr_XrEntry_frameStart(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
bool result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (bool)(arg1)->frameStart();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_frameStart)
|
|
|
|
static bool js_cc_xr_XrEntry_renderLoopStart(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->renderLoopStart(arg2);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_renderLoopStart)
|
|
|
|
static bool js_cc_xr_XrEntry_renderLoopEnd(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->renderLoopEnd(arg2);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_renderLoopEnd)
|
|
|
|
static bool js_cc_xr_XrEntry_frameEnd(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
(arg1)->frameEnd();
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_frameEnd)
|
|
|
|
static bool js_cc_xr_XrEntry_isRenderAllowable(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
bool result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (bool)(arg1)->isRenderAllowable();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_isRenderAllowable)
|
|
|
|
static bool js_cc_xr_XrEntry_computeViewProjection(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
uint32_t arg2 ;
|
|
float arg3 ;
|
|
float arg4 ;
|
|
float arg5 ;
|
|
std::vector< float > result;
|
|
|
|
if(argc != 4) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 4);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
|
|
ok &= sevalue_to_native(args[1], &arg3, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
ok &= sevalue_to_native(args[2], &arg4, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
ok &= sevalue_to_native(args[3], &arg5, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
result = (arg1)->computeViewProjection(arg2,arg3,arg4,arg5);
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
|
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_computeViewProjection)
|
|
|
|
static bool js_cc_xr_XrEntry_getEyeFov(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
uint32_t arg2 ;
|
|
std::vector< float > result;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
result = (arg1)->getEyeFov(arg2);
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
|
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getEyeFov)
|
|
|
|
static bool js_cc_xr_XrEntry_getSwapchainImageIndex(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
uint32_t result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (arg1)->getSwapchainImageIndex();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getSwapchainImageIndex)
|
|
|
|
static bool js_cc_xr_XrEntry_setMultisamplesRTT(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->setMultisamplesRTT(arg2);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setMultisamplesRTT)
|
|
|
|
static bool js_cc_xr_XrEntry_setRenderingScale(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
float arg2 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->setRenderingScale(arg2);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setRenderingScale)
|
|
|
|
static bool js_cc_xr_XrEntry_setIPDOffset(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
float arg2 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->setIPDOffset(arg2);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setIPDOffset)
|
|
|
|
static bool js_cc_xr_XrEntry_setBaseSpaceType(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->setBaseSpaceType(arg2);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setBaseSpaceType)
|
|
|
|
static bool js_cc_xr_XrEntry_getHMDViewPosition(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
uint32_t arg2 ;
|
|
int arg3 ;
|
|
std::vector< float > result;
|
|
|
|
if(argc != 2) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
|
|
ok &= sevalue_to_native(args[1], &arg3, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
result = (arg1)->getHMDViewPosition(arg2,arg3);
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
|
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getHMDViewPosition)
|
|
|
|
static bool js_cc_xr_XrEntry_platformLoopStart(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
bool result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (bool)(arg1)->platformLoopStart();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_platformLoopStart)
|
|
|
|
static bool js_cc_xr_XrEntry_platformLoopEnd(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
bool result;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
result = (bool)(arg1)->platformLoopEnd();
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_platformLoopEnd)
|
|
|
|
static bool js_cc_xr_XrEntry_waitFrame(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
|
|
if(argc != 0) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
(arg1)->waitFrame();
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_waitFrame)
|
|
|
|
static bool js_cc_xr_XrEntry_setXRIntConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
int arg3 ;
|
|
|
|
if(argc != 2) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
ok &= sevalue_to_native(args[1], &arg3, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->setXRIntConfig(arg2,arg3);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setXRIntConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_setXRBoolConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
bool arg3 ;
|
|
|
|
if(argc != 2) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
ok &= sevalue_to_native(args[1], &arg3);
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->setXRBoolConfig(arg2,arg3);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setXRBoolConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_setXRFloatConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
float arg3 ;
|
|
|
|
if(argc != 2) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
ok &= sevalue_to_native(args[1], &arg3, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->setXRFloatConfig(arg2,arg3);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setXRFloatConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_setXRStringConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
std::string arg3 ;
|
|
|
|
if(argc != 2) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
ok &= sevalue_to_native(args[1], &arg3, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
|
|
(arg1)->setXRStringConfig(arg2,arg3);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setXRStringConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_setXRPointerConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
void *arg3 = (void *) NULL ;
|
|
|
|
if(argc != 2) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
ok &= sevalue_to_native(args[1], &arg3);
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
(arg1)->setXRPointerConfig(arg2,arg3);
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_setXRPointerConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_getXRIntConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
int result;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
result = (int)(arg1)->getXRIntConfig(arg2);
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getXRIntConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_getXRBoolConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
bool result;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
result = (bool)(arg1)->getXRBoolConfig(arg2);
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getXRBoolConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_getXRFloatConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
float result;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
result = (float)(arg1)->getXRFloatConfig(arg2);
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getXRFloatConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_getXRStringConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
std::string result;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
result = (arg1)->getXRStringConfig(arg2);
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
|
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getXRStringConfig)
|
|
|
|
static bool js_cc_xr_XrEntry_getXRPointerConfig(se::State& s)
|
|
{
|
|
CC_UNUSED bool ok = true;
|
|
const auto& args = s.args();
|
|
size_t argc = args.size();
|
|
cc::xr::XrEntry *arg1 = (cc::xr::XrEntry *) NULL ;
|
|
int arg2 ;
|
|
void *result = 0 ;
|
|
|
|
if(argc != 1) {
|
|
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
|
return false;
|
|
}
|
|
arg1 = SE_THIS_OBJECT<cc::xr::XrEntry>(s);
|
|
if (nullptr == arg1) return true;
|
|
|
|
ok &= sevalue_to_native(args[0], &arg2, s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
result = (void *)(arg1)->getXRPointerConfig(arg2);
|
|
|
|
ok &= nativevalue_to_se(result, s.rval(), s.thisObject());
|
|
SE_PRECONDITION2(ok, false, "Error processing arguments");
|
|
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
|
|
|
|
|
return true;
|
|
}
|
|
SE_BIND_FUNC(js_cc_xr_XrEntry_getXRPointerConfig)
|
|
|
|
static bool js_delete_cc_xr_XrEntry(se::State& s)
|
|
{
|
|
return true;
|
|
}
|
|
SE_BIND_FINALIZE_FUNC(js_delete_cc_xr_XrEntry)
|
|
|
|
bool js_register_cc_xr_XrEntry(se::Object* obj) {
|
|
auto* cls = se::Class::create("XrEntry", obj, nullptr, nullptr);
|
|
|
|
cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE);
|
|
|
|
cls->defineFunction("createXrInstance", _SE(js_cc_xr_XrEntry_createXrInstance));
|
|
cls->defineFunction("pauseXrInstance", _SE(js_cc_xr_XrEntry_pauseXrInstance));
|
|
cls->defineFunction("resumeXrInstance", _SE(js_cc_xr_XrEntry_resumeXrInstance));
|
|
cls->defineFunction("destroyXrInstance", _SE(js_cc_xr_XrEntry_destroyXrInstance));
|
|
cls->defineFunction("getXrViewCount", _SE(js_cc_xr_XrEntry_getXrViewCount));
|
|
cls->defineFunction("initXrSwapchains", _SE(js_cc_xr_XrEntry_initXrSwapchains));
|
|
cls->defineFunction("isCreatedXrInstance", _SE(js_cc_xr_XrEntry_isCreatedXrInstance));
|
|
cls->defineFunction("setXrFrameBuffer", _SE(js_cc_xr_XrEntry_setXrFrameBuffer));
|
|
cls->defineFunction("getXrFrameBuffer", _SE(js_cc_xr_XrEntry_getXrFrameBuffer));
|
|
cls->defineFunction("attachXrFramebufferTexture2D", _SE(js_cc_xr_XrEntry_attachXrFramebufferTexture2D));
|
|
cls->defineFunction("isSessionRunning", _SE(js_cc_xr_XrEntry_isSessionRunning));
|
|
cls->defineFunction("frameStart", _SE(js_cc_xr_XrEntry_frameStart));
|
|
cls->defineFunction("renderLoopStart", _SE(js_cc_xr_XrEntry_renderLoopStart));
|
|
cls->defineFunction("renderLoopEnd", _SE(js_cc_xr_XrEntry_renderLoopEnd));
|
|
cls->defineFunction("frameEnd", _SE(js_cc_xr_XrEntry_frameEnd));
|
|
cls->defineFunction("isRenderAllowable", _SE(js_cc_xr_XrEntry_isRenderAllowable));
|
|
cls->defineFunction("computeViewProjection", _SE(js_cc_xr_XrEntry_computeViewProjection));
|
|
cls->defineFunction("getEyeFov", _SE(js_cc_xr_XrEntry_getEyeFov));
|
|
cls->defineFunction("getSwapchainImageIndex", _SE(js_cc_xr_XrEntry_getSwapchainImageIndex));
|
|
cls->defineFunction("setMultisamplesRTT", _SE(js_cc_xr_XrEntry_setMultisamplesRTT));
|
|
cls->defineFunction("setRenderingScale", _SE(js_cc_xr_XrEntry_setRenderingScale));
|
|
cls->defineFunction("setIPDOffset", _SE(js_cc_xr_XrEntry_setIPDOffset));
|
|
cls->defineFunction("setBaseSpaceType", _SE(js_cc_xr_XrEntry_setBaseSpaceType));
|
|
cls->defineFunction("getHMDViewPosition", _SE(js_cc_xr_XrEntry_getHMDViewPosition));
|
|
cls->defineFunction("platformLoopStart", _SE(js_cc_xr_XrEntry_platformLoopStart));
|
|
cls->defineFunction("platformLoopEnd", _SE(js_cc_xr_XrEntry_platformLoopEnd));
|
|
cls->defineFunction("waitFrame", _SE(js_cc_xr_XrEntry_waitFrame));
|
|
cls->defineFunction("setXRIntConfig", _SE(js_cc_xr_XrEntry_setXRIntConfig));
|
|
cls->defineFunction("setXRBoolConfig", _SE(js_cc_xr_XrEntry_setXRBoolConfig));
|
|
cls->defineFunction("setXRFloatConfig", _SE(js_cc_xr_XrEntry_setXRFloatConfig));
|
|
cls->defineFunction("setXRStringConfig", _SE(js_cc_xr_XrEntry_setXRStringConfig));
|
|
cls->defineFunction("setXRPointerConfig", _SE(js_cc_xr_XrEntry_setXRPointerConfig));
|
|
cls->defineFunction("getXRIntConfig", _SE(js_cc_xr_XrEntry_getXRIntConfig));
|
|
cls->defineFunction("getXRBoolConfig", _SE(js_cc_xr_XrEntry_getXRBoolConfig));
|
|
cls->defineFunction("getXRFloatConfig", _SE(js_cc_xr_XrEntry_getXRFloatConfig));
|
|
cls->defineFunction("getXRStringConfig", _SE(js_cc_xr_XrEntry_getXRStringConfig));
|
|
cls->defineFunction("getXRPointerConfig", _SE(js_cc_xr_XrEntry_getXRPointerConfig));
|
|
|
|
|
|
cls->defineStaticFunction("getInstance", _SE(js_cc_xr_XrEntry_getInstance_static));
|
|
cls->defineStaticFunction("destroyInstance", _SE(js_cc_xr_XrEntry_destroyInstance_static));
|
|
|
|
|
|
cls->defineFinalizeFunction(_SE(js_delete_cc_xr_XrEntry));
|
|
|
|
|
|
cls->install();
|
|
JSBClassType::registerClass<cc::xr::XrEntry>(cls);
|
|
|
|
__jsb_cc_xr_XrEntry_proto = cls->getProto();
|
|
__jsb_cc_xr_XrEntry_class = cls;
|
|
se::ScriptEngine::getInstance()->clearException();
|
|
return true;
|
|
}
|
|
|
|
|
|
|
|
|
|
bool register_all_xr(se::Object* obj) {
|
|
// Get the ns
|
|
se::Value nsVal;
|
|
if (!obj->getProperty("xr", &nsVal, true))
|
|
{
|
|
se::HandleObject jsobj(se::Object::createPlainObject());
|
|
nsVal.setObject(jsobj);
|
|
obj->setProperty("xr", nsVal);
|
|
}
|
|
se::Object* ns = nsVal.toObject();
|
|
/* Register classes */
|
|
js_register_cc_xr_XrEntry(ns);
|
|
|
|
/* Register global variables & global functions */
|
|
|
|
|
|
|
|
return true;
|
|
}
|
|
|
|
|
|
#if defined(__clang__)
|
|
#pragma clang diagnostic pop
|
|
#elif defined(__GNUC__) || defined(__GNUG__)
|
|
#pragma GCC diagnostic pop
|
|
#elif defined(_MSC_VER)
|
|
#pragma warning(pop)
|
|
#endif
|
|
// clang-format on
|