Update readme

This commit is contained in:
Rich Geldreich
2019-04-29 19:24:28 -07:00
committed by GitHub
parent dd0380219c
commit 1d3a4e029d
+12 -1
View File
@@ -1,5 +1,5 @@
# basis_universal
Basis Universal GPU Texture Compressor
Basis Universal GPU Texture Compression Codec
So far, we've compiled this using MSVS 2019, and under Ubuntu using cmake with either clang 3.8 or gcc 5.4.
@@ -21,3 +21,14 @@ https://duckduckgo.com/?q=mali+texture+compression+tool&atb=v146-1&ia=web
https://gpuopen.com/gaming-product/compressonator/
https://www.imgtec.com/developers/powervr-sdk-tools/pvrtextool/
To use .basis files in an application, you only need the files in the "transcoder" directory. The entire transcoder lives in a single .cpp file: transcoder/basisu_transcoder.cpp. If compiling with gcc/clang, be sure strict aliasing is disabled when compiling this file: -fno-strict-aliasing
To use the transcoder, #include "transcoder/basisu_transcoder.h" and "transcoder/basisu_global_selector_palette.h". Call basist::basisu_transcoder_init() a single time (probably at startup). Also, probably at startup, you need to create a single instance of the basist::etc1_global_selector_codebook class, like this:
basist::etc1_global_selector_codebook sel_codebook(basist::g_global_selector_cb_size, basist::g_global_selector_cb);
Now you can use the transcoder, which is implemented in the "basisu_transcoder" class in transcoder/basisu_transcoder.h. The key methods are start_decoding(), get_total_images(), get_image_info(), get_image_level_info(), and transcode_image_level().
I will be simplifying the transcoder so the caller doesn't need to deal with etc1_global_selector_codebook's next.
transcode_image_level() and transcode_slice() are thread safe, i.e. you can decompressor multiple images/slices from multiple threads. start_decoding() is not thread safe.