UI and interface
[convexer.git] / nbvtf / nbvtf.h
index c0071c98546df187baedba91bd1fecdcbde98292..e6318c00f7242faae6f98df5b38f4733d27803f5 100644 (file)
@@ -33,7 +33,7 @@
 //   w, h - MAXIMUM image dimentions of final product. Set as 0 to be automatic
 //
 // version history:
-//   v1.03  - Added quality switch
+//   v1.03  - Added quality switch, moved init (major api revision)
 //   v1.02  - Improved box filtering, small bug fixes
 //   v1.01  - switch to OpenGL normal format for input
 //   v1.00  - (hgn) first release
@@ -450,17 +450,19 @@ uint32_t nbvtf_sizeimg( int w, int h, EImageFormat_t format )
        return 0;
 }
 
-void nbvtf_dxt_block( uint8_t *dest, uint8_t *src, int alpha, int qual )
+#ifdef NBVTF_AS_SO
+__attribute__((visibility("default")))
+#endif
+void nbvtf_init(void)
 {
 #ifdef USE_LIBRGBCX
-       // TODO: move this somewehre else
-       static int init = 0;
-       if( !init )
-       {
-               rgbcx__init();
-               init = 1;
-       }
+   rgbcx__init();
+#endif
+}
 
+void nbvtf_dxt_block( uint8_t *dest, uint8_t *src, int alpha, int qual )
+{
+#ifdef USE_LIBRGBCX
        if( alpha )
        {
                rgbcx__encode_bc3( qual, dest, src );