MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / transcodeBasis

Method transcodeBasis

interface/js_binding/ktx_wrapper.cpp:239–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237 }
238
239 ktx_error_code_e transcodeBasis(const val& targetFormat, const val& decodeFlags)
240 {
241 if (!isTexture2())
242 {
243 std::cout << "ERROR: transcodeBasis is only supported for KTX2" << std::endl;
244 return KTX_INVALID_OPERATION;
245 }
246
247 KTX_error_code result = ktxTexture2_TranscodeBasis(
248 *this,
249 targetFormat.as<ktx_transcode_fmt_e>(),
250 decodeFlags.as<ktx_transcode_flags>());
251
252 if (result != KTX_SUCCESS)
253 {
254 std::cout << "ERROR: Failed to transcode: " << ktxErrorString(result) << std::endl;
255 }
256 return result;
257 }
258
259 ktx_error_code_e decodeAstc()
260 {

Callers 2

uploadTextureToGlFunction · 0.45
uploadTextureToGlFunction · 0.45

Calls 2

ktxErrorStringFunction · 0.85

Tested by

no test coverage detected