David Eisner

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

101 Neutral

About David Eisner

  • Rank
    Newbie
  1. So when I execute this code, my program crashes. [source lang="cpp"] //load vertex and pixel shaders ID3D10Blob *VS, *PS; D3DX11CompileFromFile(L"shaders.hlsl", 0, 0, "VShader", "vs_5_0", 0, 0, 0, &VS, 0, 0); D3DX11CompileFromFile(L"shaders.hlsl", 0, 0, "PShader", "ps_5_0", 0, 0, 0, &PS, 0, 0); //create shader objects dev->CreateVertexShader(VS->GetBufferPointer(), VS->GetBufferSize(), NULL, &pVS); dev->CreatePixelShader(PS->GetBufferPointer(), PS->GetBufferSize(), NULL, &pPS);[/source] Despite having the shaders written to them, the blobs are null after the CompileFromFile functions and cause the program to crash when they're dereferenced on the next lines. I'm willing to bet it's because there is no "shaders.hlsl" in my project directory, but then I don't know where it would be. Do I have to download it from somewhere or am I missing something?