diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c65db6..779c0aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,25 +1,25 @@ -name: CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Setup repo - uses: actions/checkout@v2 - - - name: Setup Deno - uses: denoland/setup-deno@main - with: - deno-version: 'v1.x' - - - name: Deno Fmt - run: deno fmt --check - - - name: Deno Lint - run: deno lint \ No newline at end of file +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Setup repo + uses: actions/checkout@v2 + + - name: Setup Deno + uses: denoland/setup-deno@main + with: + deno-version: "v1.x" + + - name: Deno Fmt + run: deno fmt --check + + - name: Deno Lint + run: deno lint diff --git a/examples/webgpu-cube-floating.ts b/examples/webgpu-cube-floating.ts index c1c7f64..4d8bdb1 100644 --- a/examples/webgpu-cube-floating.ts +++ b/examples/webgpu-cube-floating.ts @@ -75,8 +75,6 @@ const context = surface.getContext("webgpu"); context.configure({ device, format: "bgra8unorm", - width, - height, }); const verticesBuffer = device.createBuffer({ diff --git a/examples/webgpu-cube.ts b/examples/webgpu-cube.ts index 4da0e68..18ee07d 100644 --- a/examples/webgpu-cube.ts +++ b/examples/webgpu-cube.ts @@ -72,8 +72,6 @@ const context = surface.getContext("webgpu"); context.configure({ device, format: "bgra8unorm", - width, - height, }); const verticesBuffer = device.createBuffer({ diff --git a/examples/webgpu-fractal-cube.ts b/examples/webgpu-fractal-cube.ts index cd89a8d..c359f54 100644 --- a/examples/webgpu-fractal-cube.ts +++ b/examples/webgpu-fractal-cube.ts @@ -114,9 +114,7 @@ context.configure({ device, format: presentationFormat, usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC, - // alphaMode: "premultiplied", - width, - height, + // alphaMode: "premultiplied", }); const verticesBuffer = device.createBuffer({ diff --git a/examples/webgpu-triangle.ts b/examples/webgpu-triangle.ts index 333664e..81dc348 100644 --- a/examples/webgpu-triangle.ts +++ b/examples/webgpu-triangle.ts @@ -19,8 +19,6 @@ const context = surface.getContext("webgpu"); context.configure({ device, format: "bgra8unorm", - width, - height, }); const shaderCode = ` diff --git a/examples/webgpu.ts b/examples/webgpu.ts index 142bc9a..b8a19bc 100644 --- a/examples/webgpu.ts +++ b/examples/webgpu.ts @@ -19,8 +19,6 @@ const context = surface.getContext("webgpu"); context.configure({ device, format: "bgra8unorm", - width, - height, }); await mainloop(() => { diff --git a/src/platform/glfw/window.ts b/src/platform/glfw/window.ts index 301e78d..d95a457 100644 --- a/src/platform/glfw/window.ts +++ b/src/platform/glfw/window.ts @@ -1117,7 +1117,13 @@ export class WindowGlfw extends DwmWindow { windowSurface() { const [platform, handle, display] = this.#rawHandle(); - return new Deno.UnsafeWindowSurface(platform, handle, display); + return new Deno.UnsafeWindowSurface({ + system: platform, + windowHandle: handle, + displayHandle: display, + width: this.size.width, + height: this.size.height, + }); } close() {