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

Était-ce utile?

La 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);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top