chirsz-ever / deno-webgpu-window-demos

use deno to display WebGPU demos
Boost Software License 1.0
18 stars 0 forks source link

Cant run the example #2

Closed ahdyt closed 4 months ago

ahdyt commented 4 months ago

Hi there, I've got the following error when running the example, what's missing? the Deno.dlopen or the sdl2?

PS D:\cp\git\deno-webgpu-window-demos> deno run -A threejs/webgpu-backdrop.js error: Uncaught (in promise) Error: Could not open library: The specified module could not be found.

const sdl2 = Deno.dlopen(getLibraryPath("SDL2"), { ^ at new DynamicLibrary (ext:deno_ffi/00_ffi.js:481:42) at Object.dlopen (ext:deno_ffi/00_ffi.js:616:10) at https://jsr.io/@divy/sdl2/0.10.5/mod.ts:47:19

chirsz-ever commented 4 months ago

You need use environment variable DENO_SDL2_PATH to specify the path of SDL2 library, see https://github.com/littledivy/deno_sdl2.