Commit Graph

151 Commits

Author SHA1 Message Date
Martin Fouilleul d01dc832fb [gles] Support for exposing GLES surfaces to orca apps
- update gles surface example
- add mp_dispatch_on_main_thread_sync() to osx threads
- add /experimental:c11atomics to glesTriangle build.bat
- mp_dispatch_on_main_thread_sync: win32 impl
- move mp_dispatch_on_main_thread_sync() on app layer
- configure dlmalloc to not assume contiguity. This allows us to reserve blocks on our end without trashing malloc-owned zones. This way we can add a block to store GL static strings when needed.
- implement deselect interface
- Log an error when an OpenGL function is called while no OpenGL API is selected, or if that function is not part of the selected API
- avoid dispatching calls to image or canvas API if surface is not selected. However, we could later allow it and temporarily select the surface _on behalf of the user_.
- Adding support for format string and optional parameters in assert macros
2023-08-08 22:15:53 +02:00
Reuben Dunnington 6ec113b708
examples: replace pthread with mp_thread 2023-07-30 21:21:25 -07:00
martinfouilleul a35f0b82b2 [win32, gl canvas] bound check intermediate buffers in canvas shaders 2023-07-27 12:11:30 +02:00
martinfouilleul 680deb35b0 [win32, gl canvas] grow path and element input buffers as needed 2023-07-27 11:37:39 +02:00
martinfouilleul 0785b6b637 [win32]
- Take drop shadown into account when calling SetWindowPos (milepost window frame _excludes_ the drop shadow)
- Fix mp_window_center()
2023-07-26 17:35:58 +02:00
martinfouilleul 2c0d3268e7 [win32] update window rect API 2023-07-26 16:50:45 +02:00
Martin Fouilleul 1fd9d17e82 [osx] settle on consistent API for getting/setting window rect 2023-07-26 15:54:01 +02:00
martinfouilleul a4ae1cf214 [win32, surface] Fix auto-selecting surface when first creating one ; checking why smooth resize still doesn't work even though we receive events and draw in a separate thread 2023-07-25 15:55:09 +02:00
martinfouilleul 3816e85592 [win32, surface] always resize surface to parent window's client area 2023-07-25 14:18:02 +02:00
martinfouilleul 782b7f54ae [win32, canvas] only dispatch raster shader for tiles touched by paths 2023-07-14 18:58:18 +02:00
martinfouilleul 1e34c3406f fixing conflict in gl_canvas 2023-07-05 18:07:37 +02:00
martinfouilleul bdb9ddf888 [win32, canvas] added back texture atlasing and fixed incorrect culling of solid tiles when using a source texture 2023-07-04 17:24:41 +02:00
martinfouilleul 5c4c8ce505 [wip, win32, canvas] adding back textures 2023-07-04 15:59:45 +02:00
martinfouilleul 0e6d67f636 [wip, win32, canvas] Cubics segment setup 2023-07-03 14:21:53 +02:00
martinfouilleul 01aa4f838f [wip, win32, canvas] quadratics 2023-07-03 12:14:21 +02:00
martinfouilleul 899ad4c030 [wip, win32, canvas] Correctly setup path index in segment_setup.glsl 2023-07-03 11:02:04 +02:00
martinfouilleul 36c75a55dd [win32] Fix first image not being rendered in win32 canvas renderer 2023-07-02 12:49:45 +02:00
martinfouilleul b61d8868d3 [wip, win32, canvas] wip trying to fix multiple shapes 2023-07-02 12:26:54 +02:00
martinfouilleul 0870097262 [wip, win32, canvas] bin segments to screen tile queues 2023-06-30 15:18:37 +02:00
martinfouilleul f76ff94c28 [wip, win32, canvas] raster elements directly per pixel 2023-06-29 15:48:52 +02:00
martinfouilleul 83f128fb55 [win32, graphics] adding example to test rendering in a secondary thread 2023-06-21 19:14:56 +02:00
martinfouilleul 0366e3d724 [win32, graphics] experiments with multisurface with transparent top-level windows 2023-06-21 15:48:26 +02:00
martinfouilleul ae7a60b942 [win32, graphics, wip] working on multi surface, currently using top-level transparent window and moving them to cover the 'parent' window area... 2023-06-21 12:36:05 +02:00
Martin Fouilleul c357da97f6 add multi surface skeleton example 2023-06-20 11:47:02 +02:00
Martin Fouilleul 26a1af344c Fix rpath in examples 2023-06-20 11:45:59 +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 db0dadd128 [win32] allow specifying start folder in open/save dialogs 2023-05-23 17:24:38 +02:00
martinfouilleul ed45d88cfd [win32] add file type filters to open/save dialogs 2023-05-23 16:43:57 +02:00
martinfouilleul 49de9d0290 [win32] added basic mp_save_dialogue() implementation using COM IFileSaveDialog 2023-05-23 16:04:49 +02:00
martinfouilleul e24500e18d [win32] added basic mp_open_dialog() implementation using COM IFileOpenDialog 2023-05-23 15:59:29 +02:00
martinfouilleul a54c8b4f4b [win32] alert popup using TaskDialogIndirect(): automatically handles icons, dpi, and text/buttons layout (but requires Vista or higher) 2023-05-23 14:50:31 +02:00
martinfouilleul f1d8dd1ca9 [win32] crappy message box with custom button text. Not DPI aware, doesn't show message box image (eg exclamation/information mark), and has very crude layout... 2023-05-23 12:55:57 +02:00
martinfouilleul 9f7cfd985c [win32] re-introduced perf_text, tiger, and ui examples 2023-05-17 15:14:14 +02:00
martinfouilleul 2bec7a633a [win32] reflected changes to canvas surface interface on GL backend. But implementation still uses the (slower) Loop-Blinn + triangle fan method. 2023-05-16 18:06:22 +02:00
martinfouilleul b6db5107a3 [win32, wip] simple GL triangle example 2023-05-12 16:50:14 +02:00
martinfouilleul 52538248d9 [win32, wip] compile and run simple window example 2023-05-12 16:46:13 +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 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 f35e91a38c [mtl renderer] fixed clipping 2023-04-11 14:51:58 +02:00
Martin Fouilleul 03b5802529 [canvas] replace simple shape helpers with normal paths operations instead of having dedicated primitives for rounded rects/ellipses and so on 2023-04-11 11:16:23 +02:00
Martin Fouilleul c6e89c1869 [wip] adding smooth live-resizing example 2023-04-11 10:50:14 +02:00
Martin Fouilleul 551d5e084e [mtl renderer] re-introduced texturing 2023-04-09 19:24:32 +02:00
Martin Fouilleul ee3e55dadd [mtl renderer] fix msaa sample positions 2023-04-08 12:11:38 +02:00
Martin Fouilleul effd8f1dd0 [mtl canvas] use same ccw test for testing against diagonal and testing against hull 2023-04-08 10:04:17 +02:00
Martin Fouilleul d1fab449bc [mtl canvas] Fixed loop implicit matrix 2023-04-07 10:15:37 +02:00
Martin Fouilleul c4e866d9d4 [mtl canvas] Fix shader contents scaling 2023-04-05 10:31:50 +02:00
Martin Fouilleul 4c4f27066b [mtl renderer] re-introduced end caps 2023-04-05 10:25:48 +02:00