Hi guys, I'm trying to learn this stuff but running into some problems ?
I've compiled my .hlsl into a header file which contains the global variable with the precompiled shader data:
//...
// Approximately 83 instruction slots used
#endif
const BYTE g_vs[] =
{
68, 88, 66, 67, 143, 82,
13, 236, 152, 133, 219, 113,
173, 135, 18, 87, 122, 208,
124, 76, 1, 0, 0, 0,
16, 76, 0, 0, 6, 0,
//....
And now following the "Compiling at build time to header files" example at this msdn link , I've included the header files in my main.cpp and I'm trying to create the vertex shader like this:
hr = g_d3dDevice->CreateVertexShader(g_vs, sizeof(g_vs), nullptr, &g_d3dVertexShader);
if (FAILED(hr))
{
return -1;
}
and this is failing, entering the if and returing -1.
Can someone point out what I'm doing wrong? ?