Skip to content

Commit

Permalink
Update wrapper to 22.1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Capati committed Nov 18, 2024
1 parent 9707962 commit 6e12ed8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WGPU Odin Bindings

Bindings to [wgpu-native](https://github.com/gfx-rs/wgpu-native) **22.1.0.1** made by hand in the [Odin programming language](https://odin-lang.org/).
Bindings to [wgpu-native](https://github.com/gfx-rs/wgpu-native) **22.1.0.5** made by hand in the [Odin programming language](https://odin-lang.org/).

See [examples here](./examples).

Expand All @@ -22,7 +22,7 @@ The wrapper version exposes an API similar to the [Rust API](https://docs.rs/wgp

To make this repository easy to maintain and light to download, I decided to not include all binaries files (that can exceed 130MB). You can build the library yourself, but all those files are autogenerated and you can download on wgpu-native releases page:

<https://github.com/gfx-rs/wgpu-native/releases/tag/v22.1.0.1>
<https://github.com/gfx-rs/wgpu-native/releases/tag/v22.1.0.5>

**Make sure to match the version tag** is the same from upstream, just place the corresponding files according to the bindings tree in `bindings/lib/`:

Expand Down
15 changes: 11 additions & 4 deletions wrapper/adapter_ext.odin
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ adapter_info_string :: proc(
defer strings.builder_destroy(&sb)

info := adapter_get_info(self) or_return
defer wgpu.adapter_info_free_members(info)

strings.write_string(&sb, string(info.description))
strings.write_string(&sb, string(info.device))
strings.write_byte(&sb, '\n')

description: cstring = info.description
if description == nil || description == "" {
description = "Unknown"
}
strings.write_string(&sb, " - Driver: ")
strings.write_string(&sb, string(description))
strings.write_byte(&sb, '\n')

adapter_type: string
Expand All @@ -41,7 +48,7 @@ adapter_info_string :: proc(
case wgpu.Adapter_Type.Unknown:
adapter_type = "Unknown"
}
strings.write_string(&sb, " - Type: ")
strings.write_string(&sb, " - Type: ")
strings.write_string(&sb, adapter_type)
strings.write_byte(&sb, '\n')

Expand All @@ -64,7 +71,7 @@ adapter_info_string :: proc(
case wgpu.Backend_Type.OpenGLES:
backend_type = "OpenGLES"
}
strings.write_string(&sb, " - Backend: ")
strings.write_string(&sb, " - Backend: ")
strings.write_string(&sb, backend_type)

if str, err = strings.clone(strings.to_string(sb), allocator); err != nil do return
Expand Down
4 changes: 2 additions & 2 deletions wrapper/version.odin
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Version :: struct {
build: u8,
}

BINDINGS_VERSION :: Version{22, 1, 0, 1}
BINDINGS_VERSION_STRING :: "22.1.0.1"
BINDINGS_VERSION :: Version{22, 1, 0, 5}
BINDINGS_VERSION_STRING :: "22.1.0.5"

@(private = "file", init)
_version_check :: proc() {
Expand Down

0 comments on commit 6e12ed8

Please sign in to comment.