Reputation: 2843
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
Upvotes: 0
Views: 1422
Reputation: 6793
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);
Upvotes: 1