Hello together!
I'm working on a DirectX 10/11 project and was hanging for a while now at the following problem:
Result := D3DX10CreateEffectFromFile(PChar('color.fx'), TD3D10_ShaderMacro(nil^), nil, 'fx_4_0', D3D10_SHADER_ENABLE_STRICTNESS, 0, FD3D10Device, nil, nil, m_effect, errorMessage, nil);
m_technique := m_effect.GetTechniqueByIndex(0);
if (m_technique = nil) then
begin
Result := E_FAIL;
Exit;
end;
if not m_technique.IsValid then
begin
Result:=E_FAIL;
exit;
end;
result:=m_technique.GetDesc(techniqueDesc);
pass:=m_technique.GetPassByIndex(0);
if not pass.IsValid then
begin
Result := E_FAIL;
Exit;
end;
Result :=pass.GetDesc(passDesc);
When I debug, the pass.GetDesc doesn't return valid information (which I will need to create the InputLayout).
I tried this code now with Delphi XE2 and everything working fine with Delphi, so I believe now this a compiler issue. I use the JSB headers.
Can anybody help?