I want to create a shader manager class and i have a q:
I should keep the ID3D10Blob objects from which i create the shaders or i keep the shaders and deallocate the ID3D10Blob objects?
Now i use only a shader :
ID3D10Blob *VS=NULL, *PS=NULL;
ID3D10Blob *err=NULL;
HRESULT h;
h = D3DX11CompileFromFile(L"shaders.hlsl", 0, 0, "VShader", "vs_4_0", 0, 0, 0, &VS, &err, 0);
h = D3DX11CompileFromFile(L"shaders.hlsl", 0, 0, "PShader", "ps_4_0", 0, 0, 0, &PS, &err, 0);
device->CreateVertexShader(VS->GetBufferPointer(), VS->GetBufferSize(), NULL, &pVS);
device->CreatePixelShader(PS->GetBufferPointer(), PS->GetBufferSize(), NULL, &pPS);
or i need to keep them both, because pVS and pPS will keep pointer to the data from PS and VS?
[SOLVED] http://www.gamedev.net/topic/630097-save-shader-as-id3d10blob-pointer/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement