compressonator icon indicating copy to clipboard operation
compressonator copied to clipboard

CMP_InitFramework, CMP_InitHostPlugins don't add ASTC, KTX IMAGE plugins

Open ShukantPal opened this issue 4 years ago • 1 comments

After fixing #174 in my application code, I saw that Compressonator was failing on error code 28 CMP_ERR_GENERIC on saving the destination texture. I looked into the code and SaveTexture returns this error code when the IMAGE plugin responsible for saving the particular image format is not available.

It turns out that CMP_InitFramework adds a IMAGE plugin for DDS files; Compressonator application code adds plugins manually for ASTC, EXR, KTX, KTX2, and more formats. To register these plugins myself, I have to include internal header files (application/_plugins/common/pluginmanager.h) which is not good.

I think there are two solutions:

  1. Document that you have to register these plugins manually and add them to compressonator.h so developers don't have to access internal header files.
  2. Register these plugins automatically in CMP_InitFramework. I think this one is better.

ShukantPal avatar Aug 15 '21 01:08 ShukantPal

@ShukantPal Will look into adding registering plugin options in CMP_InitFramework.

NPCompress avatar Aug 18 '21 18:08 NPCompress