mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-07-04 04:59:05 +00:00
modifications for v2.5
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
// wasm_bool_t is uint32_t — convert to Python bool
|
||||
// wasm_bool_t is uint32_t - convert to Python bool
|
||||
static inline bool to_bool(wasm_bool_t v) { return v != 0; }
|
||||
|
||||
PYBIND11_MODULE(basisu_transcoder_python, m) {
|
||||
@@ -42,6 +42,9 @@ PYBIND11_MODULE(basisu_transcoder_python, m) {
|
||||
m.def("basis_tex_format_is_astc_ldr",
|
||||
[](uint32_t fmt) { return to_bool(bt_basis_tex_format_is_astc_ldr(fmt)); });
|
||||
|
||||
m.def("basis_tex_format_is_xubc7",
|
||||
[](uint32_t fmt) { return to_bool(bt_basis_tex_format_is_xubc7(fmt)); });
|
||||
|
||||
m.def("basis_tex_format_get_block_width",
|
||||
&bt_basis_tex_format_get_block_width);
|
||||
|
||||
@@ -138,10 +141,15 @@ PYBIND11_MODULE(basisu_transcoder_python, m) {
|
||||
m.def("ktx2_is_xuastc_ldr",
|
||||
[](uint64_t h) { return to_bool(bt_ktx2_is_xuastc_ldr(h)); });
|
||||
|
||||
m.def("ktx2_is_xubc7",
|
||||
[](uint64_t h) { return to_bool(bt_ktx2_is_xubc7(h)); });
|
||||
|
||||
m.def("ktx2_get_block_width", &bt_ktx2_get_block_width);
|
||||
|
||||
m.def("ktx2_get_block_height", &bt_ktx2_get_block_height);
|
||||
|
||||
m.def("ktx2_get_deblocking_filter_index", &bt_ktx2_get_deblocking_filter_index);
|
||||
|
||||
m.def("ktx2_has_alpha",
|
||||
[](uint64_t h) { return to_bool(bt_ktx2_has_alpha(h)); });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user