سؤال

Okay so I know how to use CreateDDSTextureFromFile() function, but let's say that I have DDS file in memory via void *Buffer, UINT Len... How can I create Texture from this variables?

I know that there is a CreateDDSTextureFromMemory() function but I really don't know how to use this function

هل كانت مفيدة؟

المحلول

Assuming you can already do this:

hr = CreateDDSTextureFromFile(pDevice, L"texture.dds", nullptr, &pSRV);

The following should work:

hr = CreateDDSTextureFromMemory(pDevice, Buffer, Len, nullptr, &pSRV);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top