diff --git a/quicktex/_bindings.cpp b/quicktex/_bindings.cpp index f51e42e..b3a4eff 100644 --- a/quicktex/_bindings.cpp +++ b/quicktex/_bindings.cpp @@ -71,6 +71,9 @@ py::bytes DecodeImage(const BlockDecoder &self, py::bytes encoded, unsigned imag PYBIND11_MODULE(_quicktex, m) { m.doc() = "More Stuff"; + py::options options; +// options.disable_function_signatures(); + // BlockDecoder py::class_ block_decoder(m, "BlockDecoder"); diff --git a/quicktex/s3tc/bc5/BC5Decoder.h b/quicktex/s3tc/bc5/BC5Decoder.h index eba620a..02ac7e2 100644 --- a/quicktex/s3tc/bc5/BC5Decoder.h +++ b/quicktex/s3tc/bc5/BC5Decoder.h @@ -30,7 +30,7 @@ #include "../bc4/BC4Decoder.h" #include "BC5Block.h" -namespace quicktex::s3tc { +namespace quicktex::s3tc { class BC5Decoder : public BlockDecoderTemplate { public: @@ -44,10 +44,6 @@ class BC5Decoder : public BlockDecoderTemplate { void DecodeBlock(Color4x4 dest, BC5Block *const block) const noexcept(ndebug) override; ChannelPair GetChannels() const { return ChannelPair(_chan0_decoder->GetChannel(), _chan1_decoder->GetChannel()); } - void SetChannels(ChannelPair channels) { - _chan0_decoder->SetChannel(std::get<0>(channels)); - _chan1_decoder->SetChannel(std::get<1>(channels)); - } BC4DecoderPair GetBC4Decoders() const { return BC4DecoderPair(_chan0_decoder, _chan1_decoder); } diff --git a/quicktex/s3tc/bc5/BC5Encoder.h b/quicktex/s3tc/bc5/BC5Encoder.h index ebf8a07..b1109d8 100644 --- a/quicktex/s3tc/bc5/BC5Encoder.h +++ b/quicktex/s3tc/bc5/BC5Encoder.h @@ -30,7 +30,7 @@ #include "../bc4/BC4Encoder.h" #include "BC5Block.h" -namespace quicktex::s3tc { +namespace quicktex::s3tc { class BC5Encoder : public BlockEncoderTemplate { public: @@ -44,10 +44,6 @@ class BC5Encoder : public BlockEncoderTemplate { void EncodeBlock(Color4x4 pixels, BC5Block *dest) const override; ChannelPair GetChannels() const { return ChannelPair(_chan0_encoder->GetChannel(), _chan1_encoder->GetChannel()); } - void SetChannels(ChannelPair channels) { - _chan0_encoder->SetChannel(std::get<0>(channels)); - _chan1_encoder->SetChannel(std::get<1>(channels)); - } BC4EncoderPair GetBC4Encoders() const { return BC4EncoderPair(_chan0_encoder, _chan1_encoder); } diff --git a/quicktex/s3tc/bc5/_bindings.cpp b/quicktex/s3tc/bc5/_bindings.cpp index 7d58da5..8782f14 100644 --- a/quicktex/s3tc/bc5/_bindings.cpp +++ b/quicktex/s3tc/bc5/_bindings.cpp @@ -31,7 +31,7 @@ namespace py = pybind11; namespace quicktex::bindings { using namespace quicktex::s3tc; -using namespace quicktex::s3tc ; +using namespace quicktex::s3tc; void InitBC5(py::module_ &s3tc) { auto bc5 = s3tc.def_submodule("_bc5", "BC5 encoding/decoding module"); @@ -42,14 +42,14 @@ void InitBC5(py::module_ &s3tc) { py::class_ bc5_encoder(bc5, "BC5Encoder", block_encoder); bc5_encoder.def(py::init(), py::arg("chan0") = 0, py::arg("chan1") = 1); - bc5_encoder.def_property("channels", &BC5Encoder::GetChannels, &BC5Encoder::SetChannels); + bc5_encoder.def_property_readonly("channels", &BC5Encoder::GetChannels); bc5_encoder.def_property_readonly("bc4_decoders", &BC5Encoder::GetBC4Encoders); // BC5Decoder py::class_ bc5_decoder(bc5, "BC5Decoder", block_decoder); bc5_decoder.def(py::init(), py::arg("chan0") = 0, py::arg("chan1") = 1); - bc5_decoder.def_property("channels", &BC5Decoder::GetChannels, &BC5Decoder::SetChannels); + bc5_decoder.def_property_readonly("channels", &BC5Decoder::GetChannels); bc5_decoder.def_property_readonly("bc4_decoders", &BC5Decoder::GetBC4Decoders); } } // namespace quicktex::bindings \ No newline at end of file