From 59fa93f449224a8f331a502d19f0b2e564b6cd15 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Tue, 30 Apr 2019 20:52:51 -0700 Subject: [PATCH] Update readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index d3a5069..3b4d06d 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,15 @@ The "WebGL" directory contains a very simple WebGL demo that uses the transcoder On browsers that don't support BC1 (Firefox is one), there's a low-quality fallback code path for opaque textures (but no fallback for BC3 yet). Note that the fallback path only currently converts to 16-bit RGB images, so the quality isn't as good as it should be. +Note that I was unable to disable assertions when compiling the transcoder in release (-O2), and I'm not sure why yet. Currently, basisu.h forcefully disables the assert() macro, which is ugly but works: + +`#if defined(__EMSCRIPTEN__) && !defined(_DEBUG) && !defined(DEBUG) +// HUGE HACK: I've been unable to disable assertions using emcc -O2 -s ASSERTIONS=0, no idea why. +// We definitely don't want them enabled in release. +#undef assert +#define assert(x) ((void)0) +#endif` + ### Transcoder details 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, as I have not tested either the encoder or transcoder with strict aliasing enabled: -fno-strict-aliasing (The Linux kernel is also compiled with this option.)