Update to CMake, tweaks & dds
[convexer.git] / nbvtf / librgbcx.cpp
diff --git a/nbvtf/librgbcx.cpp b/nbvtf/librgbcx.cpp
new file mode 100644 (file)
index 0000000..ae6e72c
--- /dev/null
@@ -0,0 +1,24 @@
+#include <stdint.h>
+#include <cstring>
+#include <math.h>
+
+#define RGBCX_IMPLEMENTATION
+#include "rgbcx.h"
+
+extern "C"
+{
+       void rgbcx__init(void)
+       {
+               rgbcx::init();
+       }
+
+       void rgbcx__encode_bc1( uint32_t level, void* pDst, const uint8_t* pPixels, int allow_3color, int use_transparent_texels_for_black )
+       {
+               rgbcx::encode_bc1( level, pDst, pPixels, allow_3color, use_transparent_texels_for_black );
+       }
+
+       void rgbcx__encode_bc3( uint32_t level, void* pDst, const uint8_t* pPixels )
+       {
+               rgbcx::encode_bc3( level, pDst, pPixels );
+       }
+}