Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A tiny real-time graphics rendering engine based on opengl, webgpu and webassembly.

License

NotificationsYou must be signed in to change notification settings

xrui94/iEngine

Repository files navigation

This is a real-time rendering engine, which uses the WASM ( emscripten tool chain ), based on webgl, webgpu, emscripten, OffscreenCanvas(or calle it Offscreen-Canvas) technology, through C++ code, you can deploy the engine to the desktop, mobile and HTML5 web.

  • Known issues:
    • Based on the WebGPU implementation provided by Emscripten, it can be compiled, but it runs abnormally;
    • Based on the WebGPU implementation provided by WGPU-Native, it cannot be compiled on emsdk-v3.1.60; it can be compiled on emsdk-v3.1.47, but it is also an exception.

1. Compile and Build

1.1 for Native

  • First, make a build directory
mkdirbuildcdbuild
  • Second, Generate the *.sln(Visual Studio 2022) project file
cmake..
  • Last, Build
cmake--build.

1.3 for Web

  • First, make a build directory
mkdirdistcddist
  • Second, Generate the Ninja project file

Replace the value of the parameter"- DCMAKE-TOOLCHAIN-FILE" with the absolute path of your Emscripten.cmake file.

  • Note:
    • Ifemscripten tool chain(or call it"emsdk") is not installed, you need to first download and install it according to this instructions:https://emscripten.org/docs/getting_started/downloads.html;
    • If there is noNinja in your system env, you need to first download a fromhttps://github.com/ninja-build/ninja/releases and configure system environment variables for it!
    • The default configuration parameter"-DIE_ONLY_EMSCRIPTEN=ON" means using WebGPU implementation provided by emscripten(emsdk). If you want to use the WebGPU implementation provided by wgpu-native, you need to manually specify specified"-DIE_WGPU_EMSCRIPTEN=ON" configuration parameters. However with the 3.1.60 version of emsdk, it doesn 't work yet, you can track this#issue16 for checking more details.
cmake..-DCMAKE_TOOLCHAIN_FILE="C:/env/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"-G"Ninja"
  • Last, Build
ninja

2. Run

If you want to use the native executable application, it is located in the"examples/native/lib/Debug” directory. Double click it to run. If you want to use the web application, you can install the following steps:

  • First, Install dependencies
pmpmi
  • Second, use the app

After executing the command bellow, you can use the app by opening the urlhttp://localhost:3070/ in browser.

npmstart

About

A tiny real-time graphics rendering engine based on opengl, webgpu and webassembly.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp