Jump to content
  • Advertisement
Sign in to follow this  
jakussano

DX11 DirectX 11 SHADERS

This topic is 2130 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!