c++ - DirectX Compile Shader from Memory? -


using shaders compiled files works:

    d3dx11compilefromfile(filename, null, null, "main", "vs_5_0", d3d10_shader_enable_strictness, 0, null,                     &vertexshaderbuffer, &errormessage, null); 

but if replace above line one:

d3dx11compilefrommemory(vs, strlen(vs), null, null, null, "main", "vs_5_0", d3d10_shader_enable_strictness, 0, null,                     &vertexshaderbuffer, &errormessage, null); 

while vs char* of shader file (if print vs out using std::cout, prints correctly).

it crashes @ line...

what doing wrong?

d3dx apis deprecated, should use d3dcompile apis instead d3dcompiler.h. same things d3dx11 replaced d3d transition simple.

edit message @ least callstack or output log because wihtout more information, hard more specific on answer.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -