MCPcopy Create free account
hub / github.com/defold/defold / get_subblock_pixels

Method get_subblock_pixels

engine/dlib/src/basis/encoder/basisu_etc.cpp:755–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753 }
754
755 void etc_block::get_subblock_pixels(color_rgba* pPixels, int subblock_index) const
756 {
757 if (subblock_index < 0)
758 unpack_etc1(*this, pPixels);
759 else
760 {
761 color_rgba unpacked_block[16];
762
763 unpack_etc1(*this, unpacked_block);
764
765 const bool flip_bit = get_flip_bit();
766
767 for (uint32_t i = 0; i < 8; i++)
768 {
769 const uint32_t idx = g_etc1_pixel_indices[flip_bit][subblock_index][i];
770
771 pPixels[i] = unpacked_block[idx];
772 }
773 }
774 }
775
776 bool etc1_optimizer::compute()
777 {

Callers

nothing calls this directly

Calls 1

unpack_etc1Function · 0.85

Tested by

no test coverage detected