Add more Cg specific error reporting.

This commit is contained in:
aignacio_sf 2006-04-15 01:18:59 +00:00
parent cadbb022f8
commit f90b3395d2
1 changed files with 10 additions and 0 deletions

View File

@ -512,6 +512,11 @@ bind(GSG *gsg) {
hr = cgD3D9BindProgram(_cg_program[SHADER_type_frag]);
if (FAILED (hr)) {
dxgsg9_cat.error() << "cgD3D9BindProgram pixel shader failed\n";
CGerror error = cgGetError();
if (error != CG_NO_ERROR) {
dxgsg9_cat.error() << " CG ERROR: " << cgGetErrorString(error) << "\n";
}
}
}
}
@ -648,6 +653,11 @@ issue_parameters(GSG *gsg, bool altered)
<< _mat_spec[i]._piece
<< " cgD3D9SetUniform failed "
<< D3DERRORSTRING(hr);
CGerror error = cgGetError ();
if (error != CG_NO_ERROR) {
dxgsg9_cat.error() << " CG ERROR: " << cgGetErrorString(error) << "\n";
}
}
}
}