mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
Fix last commit
This commit is contained in:
parent
5a272c954f
commit
7a81bbb58d
@ -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_<BlockDecoder> block_decoder(m, "BlockDecoder");
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "../bc4/BC4Decoder.h"
|
||||
#include "BC5Block.h"
|
||||
|
||||
namespace quicktex::s3tc {
|
||||
namespace quicktex::s3tc {
|
||||
|
||||
class BC5Decoder : public BlockDecoderTemplate<BC5Block, 4, 4> {
|
||||
public:
|
||||
@ -44,10 +44,6 @@ class BC5Decoder : public BlockDecoderTemplate<BC5Block, 4, 4> {
|
||||
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); }
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "../bc4/BC4Encoder.h"
|
||||
#include "BC5Block.h"
|
||||
|
||||
namespace quicktex::s3tc {
|
||||
namespace quicktex::s3tc {
|
||||
|
||||
class BC5Encoder : public BlockEncoderTemplate<BC5Block, 4, 4> {
|
||||
public:
|
||||
@ -44,10 +44,6 @@ class BC5Encoder : public BlockEncoderTemplate<BC5Block, 4, 4> {
|
||||
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); }
|
||||
|
||||
|
@ -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_<BC5Encoder> bc5_encoder(bc5, "BC5Encoder", block_encoder);
|
||||
|
||||
bc5_encoder.def(py::init<uint8_t, uint8_t>(), 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_<BC5Decoder> bc5_decoder(bc5, "BC5Decoder", block_decoder);
|
||||
|
||||
bc5_decoder.def(py::init<uint8_t, uint8_t>(), 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
|
Loading…
Reference in New Issue
Block a user