MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / SaveDDS

Method SaveDDS

Source/Images/texture_data.cpp:402–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402bool TextureData::SaveDDS(const char *abs_path) {
403 bool result = false;
404 if (is_loaded) {
405 result = m_crnTex.write_to_file(abs_path, texture_file_types::cFormatDDS);
406 if (!result) {
407 LOGE << m_crnTex.get_last_error().get_ptr() << endl;
408 }
409 } else {
410 LOGE << "Can't save texturedata as DDS to " << abs_path << " data is unloaded " << source_path << endl;
411 }
412 return result;
413}
414
415bool TextureData::SaveCRN(const char *abs_path, crn_format format, ConversionQuality quality) {
416 bool result = false;

Callers 3

ConvertImageFunction · 0.80
ReloadAsCompressedMethod · 0.80
ConvertToDXT5IfNeededMethod · 0.80

Calls 3

write_to_fileMethod · 0.80
get_last_errorMethod · 0.80
get_ptrMethod · 0.45

Tested by

no test coverage detected