Commit Graph

16 Commits

Author SHA1 Message Date
Martin Fouilleul c75661cfc9 [io] abstract file io API, using a request/completion model ala io_uring (w/ only synchronous completion for now), and per-platform backend 2023-05-25 20:08:38 +02:00
Martin Fouilleul 02bfe587c8 [path] adding platform path functions 2023-05-24 16:27:39 +02:00
Martin Fouilleul 1ab1d70df2 Fix image data not storing surface handle in mg_image_create() 2023-05-08 13:01:45 +02:00
Martin Fouilleul 551d5e084e [mtl renderer] re-introduced texturing 2023-04-09 19:24:32 +02:00
Martin Fouilleul 1212d714d5 [platform/canvas]
- Changed canvas coordinate system to match UI coord system (origin at top left, y axis down)
- Changed mouse coordinate system to match UI and canvas
- No need to pass width/height to ui_begin_frame() anymore
2023-03-08 13:19:18 +01:00
Martin Fouilleul 3615775168 [canvas] decompose image atlas API into simple rect atlas API + image atlas helpers. This avoids creating a bunch of new types/handles, and exposes the underlying image/sourceRegion so that user code can freely use these for more complex scenarios (eg drawing only a sub-region of an atlased image, or using an atlas image for arbitrary path filling) 2023-02-28 16:54:39 +01:00
Martin Fouilleul d4bceba7e9 [canvas] basic image atlas API 2023-02-28 13:16:36 +01:00
martinfouilleul ac6a5db209 [canvas, gl] Checked batching/transparency 2023-02-27 19:39:26 +01:00
martinfouilleul 8f834fa1a5 [wip, canvas, gl] implementing basic image API 2023-02-27 19:25:41 +01:00
Martin Fouilleul 5e5f8ac5e7 adding image test/example 2023-02-27 15:43:41 +01:00
Martin Fouilleul 9ed630fc55 [canvas]
- Clear final surface to clear color, and enable blending layers onto it
- Fixed Batching bug where we were writing to vertex/shape buffers while the previous batch is using them
- Fixed bug where uvTransform uses transform of next shape instead of that of shape being finalized
2023-02-27 11:56:04 +01:00
Martin Fouilleul b24de5d969 [canvas] Allow setting image source region 2023-02-25 12:59:49 +01:00
Martin Fouilleul 50569a1427 Allow setting texture on arbitrary path fills 2023-02-24 23:06:39 +01:00
Martin Fouilleul 4333ed02b0 [canvas] remove image draw commands, replace with rect/rounded rects + image source 2023-02-24 22:59:33 +01:00
Martin Fouilleul 1b62ec568c [canvas, mtl backend] Handle image rotation 2023-02-24 20:40:16 +01:00
Martin Fouilleul fd4c4e7be3 [canvas] simple image API 2023-02-24 12:01:00 +01:00