d3dcoder / d3d12book

Sample code for the book "Introduction to 3D Game Programming with DirectX 12"
1.54k stars 591 forks source link

Is below code has problem in d3dUtil::CompileShader #4

Closed qzhan15 closed 8 years ago

qzhan15 commented 8 years ago

ComPtr byteCode = nullptr; ComPtr errors; hr = D3DCompileFromFile(filename.c_str(), defines, D3D_COMPILE_STANDARD_FILE_INCLUDE, entrypoint.c_str(), target.c_str(), compileFlags, 0, &byteCode, &errors);

Should I parse byteCode->GetAddressOf() and errors->GetAddressOf() instead of &byteCode and &error? since these are ComPtr type

qzhan15 commented 8 years ago

checked msdn, this is not a issue

plasmasnakeneo commented 8 years ago

What resolved this for you? I am getting an error here and do not know how to fix it.