The goal of this change is to make it possible to use package mtl
to render to a window at interactive framerates (e.g., at 60 FPS,
assuming a 60 Hz display with vsync on). It adds the minimal API
that is needed.
A new movingtriangle example is added as a demonstration of this
functionality. It opens a window and renders a triangle that follows
the mouse cursor.
Much of the needed API comes from Core Animation, AppKit frameworks,
rather than Metal. Avoid adding that to mtl package; instead create
separate packages. For now, they are hidden in internal to avoid
committing to a public API and import path. After gaining more
confidence in the approach, they can be factored out and made public.
dmitshur changed the title WIP: Add minimal API to support rendering to a window at 60 FPS.WIP: Add minimal API to support interactive rendering in a window. 6 years ago
dmitshur changed the title WIP: Add minimal API to support interactive rendering in a window.Add minimal API to support interactive rendering in a window. 6 years ago
The goal of this change is to make it possible to use package mtl to render to a window at interactive framerates (e.g., at 60 FPS, assuming a 60 Hz display with vsync on). It adds the minimal API that is needed.
A new movingtriangle example is added as a demonstration of this functionality. It opens a window and renders a triangle that follows the mouse cursor.
Much of the needed API comes from Core Animation, AppKit frameworks, rather than Metal. Avoid adding that to mtl package; instead create separate packages. For now, they are hidden in internal to avoid committing to a public API and import path. After gaining more confidence in the approach, they can be factored out and made public.