Commit Graph

18 Commits

Author SHA1 Message Date
martinfouilleul 5c4c8ce505 [wip, win32, canvas] adding back textures 2023-07-04 15:59:45 +02:00
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
martinfouilleul 9f7cfd985c [win32] re-introduced perf_text, tiger, and ui examples 2023-05-17 15:14:14 +02:00
Martin Fouilleul b27dc615d1 Finish separating graphics_common and graphics_surface + add platform_math, so that we can compile graphics_common to wasm in orca 2023-04-26 14:56:02 +02:00
Martin Fouilleul 346979a21a [canvas] change surface/canvas APIs to treat canvas a 'just another kind of surface', and split canvas implementation (managed by surface) from canvas _command buffer_ and implicit context (represented by mg_canvas) 2023-04-25 19:13:15 +02:00
Martin Fouilleul 794f47b141 abstracting logging for orca 2023-04-18 18:05:54 +02:00
Martin Fouilleul 92f4909d63 [mtl canvas] testing the metal canvas rendering the ghostscript tiger, and acknowledging it's painfully slow 2023-03-18 14:35:51 +01:00
Martin Fouilleul 1d36088302 [mtl canvas] render to an intermediate texture and acquire the drawable and blit to it only at the end of all compute passes 2023-03-16 10:25:56 +01:00
Martin Fouilleul bd8e31c535 [mtl canvas] triple buffer vertex/index/shape buffers 2023-03-15 17:48:39 +01: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 bfc19665ce [util]
- shorten str8_lit macro to STR8
- use strlen() in STR8 and remove str8_from_cstring(). Usage with string literal seem to always be optimized by compile-time constant, so there's little need for a confusing macro that only works with literals and breaks with pointers.
- replaced str8_unbox() with str8_lp/str8_ip
2023-03-08 11:40:40 +01:00
martinfouilleul 80ea8db687 [surface/canvas cleanup]
- Make build-time and runtime backend selection a bit easier
- Reorganized backend-specific files with slightly more coherent naming scheme
2023-02-10 16:56:10 +01:00
martinfouilleul 4a8c77f023 - Move and Zoom perf_text example with the mouse
- Reverted to using 4 bits of subpixel precision and computing cross products with 32 bits integers, for perf reasons
- Fixed some confusion in tile array size vs number of elements (could still clean-up naming a bit though)
- Fixed bug where triangles on the left or below canvas boundaries where bucketted to the first colum/row of tiles
- Fixed bug in mouse button message handling (was always sending press on left button)
2023-02-09 13:09:41 +01:00
martinfouilleul 833767d6e2 move text with the mouse in perf_text example 2023-02-09 09:50:53 +01:00
martinfouilleul 7cf4c3d925 opengl surface/renderer: set surface scaling according to dpi of first monitor. Use that dpi to scale backing texture of canvas renderer. Note: changing monitor isn't handled yet! 2023-02-08 18:22:54 +01:00
martinfouilleul 5788cdbcda Desktop opengl 4.3 canvas 2023-02-07 13:24:14 +01:00
martinfouilleul 5754fc1ad2 using temporary buffer to build canvas verex data and use glBufferData with exact number of vertices to submit buffer to gpu 2023-02-06 16:14:43 +01:00