-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for using WebGPU to render on the window of the desktop environment #23563
Comments
We will not add a dependency on winit or any other windowing system, the way we have it currently is the best compromise. Regarding Canvas and related: |
Why don't allow "none" |
Is this a bug? I think the alpha value do not need to multiply 255. And why there need a |
For
Footnotes |
one you missed that uses |
sounds reasonable
I don't think this is viable, since to create a |
We could hold the This optimization would not be implemented in the near future, so it is recorded here just for reference. |
Regarding three.js, see jsr.io/@3d/three. |
So far we have WebGPU and BYOW, but it need more work to use the front-end graphics ecology.
Repository for testing and integrating: https://github.com/chirsz-ever/deno-webgpu-window-demos
Seamlessly use WebGPU-backended frameworks
Bugs and requirements
createImageBitmap
with aBlob
, "TypeError: expected typed ArrayBufferView" occurred. #22649createImageBitmap
when the argument type isBlob
#23518"image/jpeg"
alphaMode
member ofGPUCanvasConfiguration
#23509Creating and managing native windows
We already have deno_sdl2 and dwm for creating windows. But they rely on third-party libraries SDL2 and GLFW.
Maybe we need some methods to create windows without any third-party libraries? I have two ideas:
import winit and design a set of interfaces to use it;1The first idea is easier to implement, but add a built-in component increases deno's compatibility costs and technical debt.
Canvas
,CanvasRenderingContext2D
andWebGL
Related issues: #5701 #1629
If deno support
Canvas
,CanvasRenderingContext2D
and WebGL, it would be more easy to use front-end graphics libraries.Deno.UnsafeWindowSurface
is analog toCanvas
, and it can usegetContext("webgpu")
to create aGPUCanvasContext
. It is worthwhile to support other contexts,getContext("2d")
,getContext("webgl")
,getContext("webgl2")
andgetContext("bitmaprenderer")
.How to implement CanvasRenderingContext2D (
Canvas.getContext("2d")
)? There are many methods in #5701, which mostly introduces skia or similar graphics libraries like Vello.For WebGL, we can just use the native OpenGL implementation (gluton)[https://github.com/deno-windowing/gluten], or import ANGLE to maximize compliance of the WebGL standard.1Maybe we can do something named "Canvas2D over WebGPU" and "WebGL over WebGPU", which only use JavaScript to implement
CanvasRenderingContext2D
and WebGL with WebGPU.If we resolve all above, implementing
OffscreenCanvas
andImageBitmapRenderingContext
(Canvas.getContext("bitmaprenderer")
) seems not hard.Footnotes
Removed by https://github.com/denoland/deno/issues/23563#issuecomment-2077777430 ↩ ↩2
The text was updated successfully, but these errors were encountered: