Reuben Dunnington
024a528afa
zig sample:
...
* generate a gradient image and draw it
* rbga8 color helpers and some const tweaks
2023-10-01 14:56:32 -04:00
Reuben Dunnington
c31c81bd9c
zig bindings: minor API cleanup
...
* deleting invalid function binding
* minor reorg stuff
2023-09-30 21:53:55 -04:00
Reuben Dunnington
23378edfec
zig bindings: namespace File data types and Io data/functions
2023-09-30 21:40:30 -04:00
Reuben Dunnington
49213353fc
zig bindings: namespace clock/canvas functions
2023-09-29 23:42:10 -04:00
Reuben Dunnington
3e6cd07b34
revert const changes to oc_font_create_from_*
...
* Martin has said the orca style is to avoid const, so we will avoid adding it where it isn't already present
* Zig bindings doesn't need the corresponding C function to have const-decorated types
2023-09-29 23:15:01 -04:00
Reuben Dunnington
eb60729721
zig bindings: string refinements/bugfixes
2023-09-29 23:03:24 -04:00
Reuben Dunnington
9c4e2125c1
fleshing out oc_str* zig bindings
2023-09-29 20:14:51 -04:00
Reuben Dunnington
d46c00f0ec
zig bindings: fixup some string list types
2023-09-29 20:13:39 -04:00
Reuben Dunnington
db2828141f
adding more orca zig bindings
2023-09-29 20:13:38 -04:00
Reuben Dunnington
4fb25d1d49
wip zig orca bindings
2023-09-29 20:13:38 -04:00
Reuben Dunnington
aa22491eb6
wip zig bindings
2023-09-29 20:13:38 -04:00
Reuben Dunnington
e06e735902
wip zig orca bindings
2023-09-29 20:13:38 -04:00
Reuben Dunnington
ee2d14e0e7
wip orca zig bindings
2023-09-29 20:13:37 -04:00
Reuben Dunnington
b85efa4bc7
fix oc_get_host_platform declaration
2023-09-29 20:13:37 -04:00
Reuben Dunnington
bded79d363
zig proof of concept is working
2023-09-29 20:13:37 -04:00
Reuben Dunnington
0fd255682d
wip zig orca sample
2023-09-29 20:13:35 -04:00
Martin Fouilleul
90dd12a69f
Aligned arena allocation
2023-09-29 10:53:48 +02:00
Martin Fouilleul
549e640102
making binding generator output explicit void for functions with no parameters. Fix oc_surface_canvas/oc_surface_gles to take explicit void
2023-09-28 21:29:03 +02:00
Martin Fouilleul
d5bd7ea2bb
fix order of file vs function in logging function arguments
2023-09-28 21:28:18 +02:00
Martin Fouilleul
fb18d3240a
Fix handling of wasm memory growing. Properly account for wasm3 header size, align on page boundary and return the previous size, asserting that there's enough memory for the requested chunk size.
2023-09-25 11:59:11 +02:00
Martin Fouilleul
388b059643
adding exp/expf
2023-09-24 18:44:32 +02:00
Martin Fouilleul
b4aedb3ecc
adding __math_xflowf
2023-09-24 11:15:08 +02:00
Reuben Dunnington
37c00bd42f
fix compile errors with pow/powf
2023-09-21 06:52:14 +00:00
Martin Fouilleul
647565e285
Put offset curve sample check count in an enum to silence -Wgnu-folding-constant
2023-09-19 11:47:27 +02:00
Martin Fouilleul
ecf89fa6b2
[macos build]
...
- Remove the need for -maes, silence warning about ignored option on ARM macs
- Set -mmacos-version-min when building wasm3 to match that of the platform layer and runtime
2023-09-19 09:56:46 +02:00
Martin Fouilleul
715ab0f6e3
put mtl renderer constants in an enum to silence -Wgnu-folding-constant warnings
2023-09-19 09:24:23 +02:00
Martin Fouilleul
370482a3e0
remove wrong alignment attribute of IM3Operation wasm3
2023-09-19 09:15:36 +02:00
Martin Fouilleul
827db17e14
update image atlas alloc functions to match image/font create functions
2023-09-19 09:10:06 +02:00
Martin Fouilleul
01565324c5
add extern C to libc-shim string.h in C++ mode
2023-09-19 08:57:23 +02:00
Reuben Dunnington
ea74114693
windows: fix vsync logspam when window is minimized
2023-09-19 06:42:58 +00:00
Reuben Dunnington
4b30bd70d0
fix gl error spam when window is resized to 0 width/height
2023-09-19 06:37:46 +00:00
Reuben Dunnington
0d839a9767
call oc_on_mouse_wheel() when getting a wheel event
2023-09-18 19:17:31 -07:00
Martin Fouilleul
34303edd4e
expose malloc/free to apps through libc-shim stdlib.h
2023-09-18 21:13:06 +02:00
Reuben Dunnington
e85d774245
Bring over more math functions from musl
...
* asin
* asinf
* acosf
* tan
* tanf
* atan
* atan2
* atan2f
* atanf
* cbrt
* cbrtf
* log
* logf
* log2
* log2f
2023-09-18 10:21:49 +00:00
Martin Fouilleul
116e614ab6
Keep log format as "function() in file:line: msg", but pass the arguments in consistent order between the host and guest app.
2023-09-18 10:19:13 +00:00
Reuben Dunnington
44477782d8
logging: move parens to be in front of function
2023-09-18 10:19:13 +00:00
Ben Visness
29cb9f50e4
Add commands to deal with Orca source code:
...
- Add a vendor commands
- Add a command that helps you set up a C compiler
- Move ext into the src folder
- Update Mac build scripts for consistency
- Update Windows batch scripts
2023-09-16 17:54:56 +02:00
Martin Fouilleul
7d3f29e43b
[ui layout]
...
- implement ui box min size, + small fixes in layout code of ui sample
- quick workaround for background showing on resize: clear to current theme's bg0 color
- precompute minsize based on children to avoid upward fixup step
- fix scrollable panel
- Simplify color overrides, override more things to counteract the light theme
- Change dragging to active for after #106 is merged
- when clamping box to minsize during shrinking, redistribute excess to siblings that still have some slack
- wrap demo in a scrollable panel
Co-authored-by: Ilia Demianenko <ilia.demianenko@gmail.com>
Co-authored-by: Martin Fouilleul <martinfouilleul@gmail.com>
2023-09-16 16:59:45 +02:00
Ilia Demianenko
33078fd9dc
UI demo with styling
2023-09-16 16:59:45 +02:00
Martin Fouilleul
300d5aeab4
add a OC_UI_HOT style selector and use that to style radio buttons when the button's label is hovered
2023-09-16 16:33:08 +02:00
Martin Fouilleul
d58643eb52
fix button & checkbox to return to normal styling when active but _not_ hovered
2023-09-16 16:18:23 +02:00
Ilia Demianenko
efeac65a96
Only highlight the widgets on mouse down when they are also hovered
2023-09-15 15:00:33 -07:00
Martin Fouilleul
09cf30cf45
Consistency/intent
...
- pass arenas as first parameters (exception being texbox widget, where we always pass tag as first parameter)
- pass lists by value when there's no modification (eg oc_list_for etc...)
- fix sketches, use oc_arena_scope as value.
2023-09-14 11:54:38 +02:00
Martin Fouilleul
47dc052508
Minor consistency things:
...
- oc_window_style could be enum
- clikCount in oc_key_event to u8
- return of oc_input_key_press -> u8
- rename oc_key_pressed/released/repeated to oc_key_press/release/repeat_count to reflect meaning of return value
2023-09-14 10:47:10 +02:00
Martin Fouilleul
0e680c989b
consistency: use _proc everywhere instead of _function or _callback in procedure typedefs. Also remove unused oc_live_resize_callback
2023-09-14 10:31:12 +02:00
Ilia Demianenko
73717b5dd8
Document palette colors
2023-09-14 07:42:09 +00:00
Ilia Demianenko
d44ac5a1fb
Use color + bgColor for selected radio instead of bgColor + borderColor
2023-09-13 14:02:50 -07:00
Ilia Demianenko
82aefaf758
Radio button group
2023-09-13 14:02:50 -07:00
Martin Fouilleul
8cd571f923
Remove oc_scratch()/oc_scratch_next() in favour of safer oc_scratch_begin()/oc_scratch_end()
2023-09-13 18:10:47 +02:00
Martin Fouilleul
a0f9ab5f85
Allow building apps in C++ mode
2023-09-13 15:18:15 +00:00