game engine - C++ File Not Found -


good morning, writing game engine dx11. problem helper files aren't being found. path of executable c:\users\aplutoniccoder\documents\visual studio 2017\projects\gameengine\debug\graphicsengine.exe. path of helper files c:\users\aplutoniccoder\documents\visual studio 2017\projects\gameengine\debug\color files\color.ps , c:\users\aplutoniccoder\documents\visual studio 2017\projects\gameengine\debug\color files\color.vs. relevant code is:

    bool colorshaderclass::initializeshader(id3d11device* devicecontext, hwnd hwnd, lpcstr vsfilename, lpcstr psfilename) {     hresult hresult;     id3dblob* errormessage;     id3dblob* vertexshaderbuffer;     id3dblob* pixelshaderbuffer;     d3d11_input_element_desc polygonlayout[2];     unsigned int noelements;     d3d11_buffer_desc matrixbufferdesc;      errormessage = 0;     vertexshaderbuffer = 0;     pixelshaderbuffer = 0;      hresult = d3dx11compilefromfile(vsfilename, null, null, "colorvertexshader", "vs_5_0", d3d10_shader_enable_strictness, 0, null, &vertexshaderbuffer, &errormessage, null);      if (failed(hresult))     {         if (errormessage)             outputshadererrormessage(errormessage, hwnd, vsfilename);         else             messagebox(hwnd, vsfilename, "missing shader file", mb_ok);          return false;     }       hresult = d3dx11compilefromfile(psfilename, null, null, "colorpixelshader", "ps_5_0", d3d10_shader_enable_strictness, 0, null, &pixelshaderbuffer, &errormessage, null);      if (failed(hresult))     {         if(errormessage)             outputshadererrormessage(errormessage, hwnd, psfilename);         else             messagebox(hwnd, vsfilename, "missing shader file", mb_ok);          return false;     }  bool colorshaderclass::initialize(id3d11device* device, hwnd hwnd) {     return initializeshader(device, hwnd, ".../color files/color.vs", ".../color files/color.ps"); } 

please me. files there , exist, messagebox pops up. thank in advance

you try this:

initializeshader(device, hwnd, path::getfullpath("color files/color.vs"), path::getfullpath("color files/color.ps")); 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -