mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-13 10:49:05 +00:00
Changed: Display HRESULT when D3DXCreateEffect fails
This commit is contained in:
parent
ef9644df28
commit
8b5fe10339
1 changed files with 3 additions and 3 deletions
|
@ -355,8 +355,8 @@ bool CDriverD3D::activeShader(CShader *shd)
|
||||||
|
|
||||||
// Assemble the shader
|
// Assemble the shader
|
||||||
LPD3DXBUFFER pErrorMsgs;
|
LPD3DXBUFFER pErrorMsgs;
|
||||||
if (D3DXCreateEffect(_DeviceInterface, shd->getText(), (UINT)strlen(shd->getText())+1, NULL, NULL, 0, NULL, &(shaderInfo->Effect), &pErrorMsgs)
|
HRESULT hr = D3DXCreateEffect(_DeviceInterface, shd->getText(), (UINT)strlen(shd->getText())+1, NULL, NULL, 0, NULL, &(shaderInfo->Effect), &pErrorMsgs);
|
||||||
== D3D_OK)
|
if (hr == D3D_OK)
|
||||||
{
|
{
|
||||||
// Get the texture handle
|
// Get the texture handle
|
||||||
uint i;
|
uint i;
|
||||||
|
@ -374,7 +374,7 @@ bool CDriverD3D::activeShader(CShader *shd)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlwarning ("Can't create shader '%s':", shd->getName());
|
nlwarning ("Can't create shader '%s' (0x%x):", shd->getName(), hr);
|
||||||
if (pErrorMsgs)
|
if (pErrorMsgs)
|
||||||
nlwarning ((const char*)pErrorMsgs->GetBufferPointer());
|
nlwarning ((const char*)pErrorMsgs->GetBufferPointer());
|
||||||
shd->_ShaderChanged = false;
|
shd->_ShaderChanged = false;
|
||||||
|
|
Loading…
Reference in a new issue