MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXNTC / LoadCompressedTextureSet

Function LoadCompressedTextureSet

tools/cli/NtcCommandLine.cpp:1590–1608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1588 textureSetFeatures.enableCompression = false;
1589 textureSetFeatures.stagingBytesPerPixel = 16;
1590
1591 ntc::Status ntcStatus = context->CreateCompressedTextureSetFromFile(
1592 g_options.loadCompressedFileName, textureSetFeatures, &textureSet);
1593
1594 if (ntcStatus != ntc::Status::Ok)
1595 {
1596 fprintf(stderr, "Failed to load compressed texture from file '%s', code = %s\n%s\n",
1597 g_options.loadCompressedFileName, ntc::StatusToString(ntcStatus), ntc::GetLastErrorMessage());
1598 return nullptr;
1599 }
1600
1601 return textureSet;
1602}
1603
1604bool DecompressTextureSetWithOptix(ntc::IContext* context, ntc::ITextureSet* textureSet, const char* inputFileName)
1605{
1606#if NTC_WITH_OPTIX
1607 ntc::FileStreamWrapper inputStream(context);
1608 ntc::Status ntcStatus = context->OpenFile(inputFileName, false, inputStream.ptr());
1609 if (ntcStatus != ntc::Status::Ok)
1610 {
1611 fprintf(stderr, "Failed to open input file '%s', code = %s: %s\n", inputFileName,

Callers 3

InitMethod · 0.85
buildUIMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected