Jump to content

  • Log In with Google      Sign In   
  • Create Account


DirectX 11 SHADERS


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 jakussano   Members   -  Reputation: 132

Like
1Likes
Like

Posted 19 September 2012 - 04:01 PM

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/

Edited by jakussano, 19 September 2012 - 04:22 PM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS