Question

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

Was it helpful?

Solution

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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top