dmitri.shuralyov.com/gpu/mtl/...

add minimal API to support interactive rendering in a window dmitri.shuralyov.com/gpu/mtl#1

Mergeddmitshur opened this change 5 years ago
dmitshur commented 5 years ago ยท edited

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.

Write Preview Markdown
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. 5 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. 5 years ago
hajimehoshi reviewed +2 5 years ago

I did a rough review and could not find a critical issue. ๐Ÿ™‚

dmitshur merged commit c4eb07ba2d711bc78bcd2606dd587d9267a61aa5 into main 5 years ago
Write Preview Markdown