Commit Graph

12 Commits

Author SHA1 Message Date
Ilia Demianenko a5567da82c Clipboard handling 2023-09-13 16:59:26 +02:00
Martin Fouilleul db36158e7a check return pointer sizes in binding stubs 2023-09-12 17:06:01 +02:00
Martin Fouilleul d90c11db58 Save return pointer before calling native function in binding stubs 2023-09-12 15:03:56 +02:00
Reuben Dunnington 15a8e2ae22 wasm bindings: enforce pointer length
* bindgen.py: print an error when a pointer argument doesn't have an annotated length
* ensure all bindings with pointers have length annotations
* add a couple helper functions for dealing with length annotations
2023-09-07 07:51:23 +00:00
Martin Fouilleul 75621d85a5 Big renaming and consistency pass, including:
- "Namespacing" the Orca APIs by adding the oc_ prefix everywhere
- Naming consistency tweaks, eg create_from_memory vs. create_from_data
- Adhering to a more consistent convention when pairing functions defining entities lifetime, eg. create/destroy, push/clear, alloc/recycle, init/cleanup
- Preferring oc_str8 to const char*, except when we expect lots of C string literals (e.g. when tagging UI widgets) or when it would be annoying to systematically wrap data we want to read/write into a string
- Reorganize macros for asserts/logging, and properly exposing them to the apps with non conflicting names
- Generally rearrange some bits and pruning unused stuff to make things more navigable
2023-08-18 16:30:55 +02:00
Martin Fouilleul e4d9955e83 [gles] expose GLES surface and GLES API to orca apps.
- Allow orca app to request either Canvas or GLES surfaces
- Add bounds check specifications to the json bindings spec format and to the bindings generator scripts.
- Generate GLES API json bindings spec from gl.xml
- Remove APIs that can't be bound with current wasm memory model (ie buffer mapping)
- Manually link remaining APIs, except glGetString
- Add fluid simulation sample
- Add abort messages for wasm loading and runtime fatal errors
- Adapt orca build tool to generate GLES json spec from gl.xml
- Adapt glesTriangle and fluid samples build scripts to new orca build tool
2023-08-08 22:54:29 +02:00
bvisness 3fae3252a1 Convert build scripts to Python (#31)
All the tooling has been built into a new command-line tool, `orca`. To use it, just run `orca -h`.

To build the samples, you must first install the orca tooling by running `orca dev install`. This simulates what it will be like to actually use the orca tooling as an end user, without the source checked out. Mostly. (I don't yet have it downloading pre-built copies of the Orca runtime libraries and `orca.exe`.)
Co-authored-by: Ben Visness <ben@bvisness.me>
Co-authored-by: Ben Visness <bvisness@gmail.com>
Co-authored-by: Martin Fouilleul <martinfouilleul@gmail.com>
Reviewed-on: #31
Co-authored-by: bvisness <ben@handmade.network>
Co-committed-by: bvisness <ben@handmade.network>
2023-08-08 09:38:43 +00:00
Reuben Dunnington 71236240ab
fully replace bindgen.py with bindgen2.py
* Removes core_api and gles_api .txt bindings and replaces them with .json versions
* Rename bindgen2.py to bindgen.py, effectively deleting the old script
* Update build.bat to reflect new changes
2023-07-28 22:20:26 -07:00
Martin Fouilleul 3874e798c3 Compile canvas command buffer into wasm and bind host surface/render API 2023-04-26 14:57:12 +02:00
Martin Fouilleul 7884ddd339 puling logging functionality from milepost into orca 2023-04-18 18:06:47 +02:00
Martin Fouilleul db7fe504bb HMN viz jam 2023-04-14 11:48:36 +02:00
Martin Fouilleul 17c0f02962 orca runtime initial commit 2023-04-12 16:21:03 +02:00