Skip to content

Commit

Permalink
Merge branch 'master' into sapp-emsc-consume-event
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Jan 2, 2024
2 parents 3557222 + adf1f83 commit 51b7b34
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 36 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/gen_bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: test_win
run: |
cd tests
Expand All @@ -16,7 +16,7 @@ jobs:
test-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- name: test_macos
run: |
Expand All @@ -26,7 +26,7 @@ jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- name: prepare
run: |
Expand All @@ -41,20 +41,20 @@ jobs:
needs: [ test-windows, test-mac, test-linux ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: floooh/sokol-zig
path: bindgen/sokol-zig
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-nim
path: bindgen/sokol-nim
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-odin
path: bindgen/sokol-odin
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-rust
path: bindgen/sokol-rust
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-zig
- uses: goto-bus-stop/setup-zig@v2
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
with:
nim-version: devel
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-nim
- uses: actions/download-artifact@v3
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-odin
- uses: actions/download-artifact@v3
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-rust
submodules: recursive
Expand All @@ -247,7 +247,7 @@ jobs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-zig
ssh-key: ${{ secrets.GHACTIONS_ZIG_PUSH }}
Expand All @@ -268,7 +268,7 @@ jobs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-nim
ssh-key: ${{ secrets.GHACTIONS_NIM_PUSH }}
Expand All @@ -289,7 +289,7 @@ jobs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-odin
ssh-key: ${{ secrets.GHACTIONS_ODIN_PUSH }}
Expand All @@ -311,7 +311,7 @@ jobs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: floooh/sokol-rust
ssh-key: ${{ secrets.GHACTIONS_RUST_PUSH }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: test_win
run: |
cd tests
Expand All @@ -15,7 +15,7 @@ jobs:
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- name: test_macos
run: |
Expand All @@ -24,15 +24,15 @@ jobs:
ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: test_ios
run: |
cd tests
./test_ios.sh
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- name: prepare
run: |
Expand All @@ -45,7 +45,7 @@ jobs:
emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- name: test_emscripten
run: |
Expand All @@ -54,7 +54,7 @@ jobs:
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/setup-java@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ The main topic of this update is to separate sampler state from image state in
sokol_gfx.h which became possible after GLES2 support had been removed from
sokol_gfx.h.

This also causes some 'colateral changes' in shader authoring and
This also causes some 'collateral changes' in shader authoring and
other sokol headers, but there was opportunity to fill a few feature gaps
in sokol_gfx.h as well:

Expand Down
2 changes: 2 additions & 0 deletions bindgen/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Language Binding Generation Scripts

> REMINDER: we can pass `-fparse-all-comments` to the clang ast-dump command line which adds the following node types to the ast-dump.json: FullComment, ParagraphComment, TextComment. This might allow us to preserve comments in the language bindings (might be useful as part of a bigger change to make sokol header comments autodoc and Intellisense-friendly)
### Zig

First make sure that clang and python3 are in the path:
Expand Down
2 changes: 1 addition & 1 deletion bindgen/gen_rust.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ def gen_helpers(inp):
if inp['prefix'] in ['sg_', 'sdtx_', 'sshape_', 'sapp_']:
l("/// Helper function to cast a rust slice into a sokol Range")
l(f"pub fn slice_as_range<T>(data: &[T]) -> {range_struct_name} {{")
l(f" {range_struct_name} {{ size: data.len() * std::mem::size_of::<T>(), ptr: data.as_ptr() as *const _ }}")
l(f" {range_struct_name} {{ size: std::mem::size_of_val(data), ptr: data.as_ptr() as *const _ }}")
l("}")
l("/// Helper function to cast a rust reference into a sokol Range")
l(f"pub fn value_as_range<T>(value: &T) -> {range_struct_name} {{")
Expand Down
4 changes: 2 additions & 2 deletions sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@
A `programmatic quit` initiated by calling sapp_quit() or
sapp_request_quit() will work as described above: the cleanup callback is
called, platform-specific cleanup is performed (on the web
this means that JS event handlers are unregisters), and then
this means that JS event handlers are unregistered), and then
the request-animation-loop will be exited. However that's all. The
web page itself will continue to exist (e.g. it's not possible to
programmatically close the browser tab).
Expand Down Expand Up @@ -926,7 +926,7 @@
append a new favicon link element, but not delete any manually
defined favicon in the page
For an example and test of the window icon feature, check out the the
For an example and test of the window icon feature, check out the
'icon-sapp' sample on the sokol-samples git repository.
ONSCREEN KEYBOARD
Expand Down
2 changes: 1 addition & 1 deletion sokol_args.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
sokol_args.h provides a simple unified argument parsing API for WebAssembly and
native apps.
When running as WebAssembly app, arguments are taken from the page URL:
When running as a WebAssembly app, arguments are taken from the page URL:
https://floooh.github.io/tiny8bit/kc85.html?type=kc85_3&mod=m022&snapshot=kc85/jungle.kcc
Expand Down
4 changes: 2 additions & 2 deletions sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -12705,7 +12705,7 @@ _SOKOL_PRIVATE void _sg_mtl_update_buffer(_sg_buffer_t* buf, const sg_range* dat
void* dst_ptr = [mtl_buf contents];
memcpy(dst_ptr, data->ptr, data->size);
#if defined(_SG_TARGET_MACOS)
if (_sg_mtl_resource_options_storage_mode_managed_or_shared() == MTLStorageModeManaged) {
if (_sg_mtl_resource_options_storage_mode_managed_or_shared() == MTLResourceStorageModeManaged) {
[mtl_buf didModifyRange:NSMakeRange(0, data->size)];
}
#endif
Expand All @@ -12723,7 +12723,7 @@ _SOKOL_PRIVATE void _sg_mtl_append_buffer(_sg_buffer_t* buf, const sg_range* dat
dst_ptr += buf->cmn.append_pos;
memcpy(dst_ptr, data->ptr, data->size);
#if defined(_SG_TARGET_MACOS)
if (_sg_mtl_resource_options_storage_mode_managed_or_shared() == MTLStorageModeManaged) {
if (_sg_mtl_resource_options_storage_mode_managed_or_shared() == MTLResourceStorageModeManaged) {
[mtl_buf didModifyRange:NSMakeRange((NSUInteger)buf->cmn.append_pos, (NSUInteger)data->size)];
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion sokol_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ extern "C" {
#endif

/*
Plug this function into the 'logger.func' struct item when initializating any of the sokol
Plug this function into the 'logger.func' struct item when initializing any of the sokol
headers. For instance for sokol_audio.h it would loom like this:
saudio_setup(&(saudio_desc){
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
else()
set(c_flags ${c_flags} -Wall -Wextra -Werror -Wsign-conversion)
set(cxx_flags ${cxx_flags} -Wall -Wextra -Werror -Wsign-conversion -fno-rtti -fno-exceptions)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(c_flags ${c_flags} -Wno-missing-field-initializers)
set(cxx_flags ${cxx_flags} -Wno-missing-field-initializers)
endif()
Expand Down
10 changes: 5 additions & 5 deletions util/sokol_spine.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
==========================
During initialization:
- call sspine_setup() after initializating sokol-gfx
- call sspine_setup() after initializing sokol-gfx
- create an atlas object from a Spine atlas file with sspine_make_atlas()
- load and initialize the sokol-gfx image objects referenced by the atlas
- create a skeleton object from a Spine skeleton file with sspine_make_skeleton()
Expand Down Expand Up @@ -424,7 +424,7 @@
sspine_shutdown();
sg_shutdown();
- You can explicitely destroy the base object types if you don't need them
- You can explicitly destroy the base object types if you don't need them
any longer. This will cause the underlying spine-c objects to be
freed and the memory to be returned to the operating system:
Expand Down Expand Up @@ -578,10 +578,10 @@
- sspine_context_draw_layer_in_instance(ctx, ...)
- sspine_context_draw_layer(ctx, ...)
These explicitely take a context argument, completely ignore
These explicitly take a context argument, completely ignore
and don't change the active context.
You can query some information about the a context with the function:
You can query some information about a context with the function:
sspine_context_info info = ssgpine_get_context_info(ctx);
Expand All @@ -604,7 +604,7 @@
- SSPINE_RESOURCE_VALID: the object is valid and ready to use
- SSPINE_RESOURCE_FAILED: the object creation has failed
- SSPINE_RESOURCE_INVALID: the object or one of its dependencies is
invalid, it either no longer exists, or the the handle hasn't been
invalid, it either no longer exists, or the handle hasn't been
initialized with a call to one of the object creation functions
MISC HELPER FUNCTIONS:
Expand Down

0 comments on commit 51b7b34

Please sign in to comment.