Members - Reputation: 149
Posted 08 December 2012 - 11:26 AM
Members - Reputation: 1303
Posted 08 December 2012 - 11:37 AM
in.read((char*)vs_blob->GetBufferPointer() , vs_size);
After that, once you have the blob, you go on creating your shader as usual.
Members - Reputation: 319
Posted 08 December 2012 - 01:01 PM
filename is for example: L"Shadows.cso" (or what ever format you have, maybe .fxo)
mFX is : ID3DX11Effect* mFX;
std::ifstream fin(filename, std::ios::binary); fin.seekg(0, std::ios_base::end); int size = (int)fin.tellg(); fin.seekg(0, std::ios_base::beg); std::vector<char> compiledShader(size); fin.read(&amp;amp;compiledShader, size); fin.close(); D3DX11CreateEffectFromMemory(&compiledShader, size, 0, device, &mFX);
Edited by ~Helgon, 08 December 2012 - 01:03 PM.
from time to time i find time