create device in JS (#3598)

This commit is contained in:
Yun Hsiao Wu
2021-06-07 11:10:06 +08:00
committed by GitHub
parent 9e0a8eaf7b
commit 448ea846d8
27 changed files with 169 additions and 239 deletions
@@ -66,16 +66,6 @@ bool setCanvasCallback(se::Object * /*global*/) {
reinterpret_cast<uintptr_t>(cc::cocosApp.window));
se->evalString(commandBuf);
gfx::DeviceInfo deviceInfo;
deviceInfo.windowHandle = reinterpret_cast<uintptr_t>(cc::cocosApp.window);
deviceInfo.width = static_cast<uint>(viewLogicalSize.x);
deviceInfo.height = static_cast<uint>(viewLogicalSize.y);
deviceInfo.nativeWidth = static_cast<uint>(viewLogicalSize.x);
deviceInfo.nativeHeight = static_cast<uint>(viewLogicalSize.y);
deviceInfo.bindingMappingInfo = pipeline::bindingMappingInfo;
gfx::DeviceManager::create(deviceInfo);
return true;
}