1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| "dxsupport"
HRESULT APIENTRY hkIDirect3DDevice9::SetTexture(DWORD Stage, IDirect3DBaseTexture9 *pTexture)
{
try
{
IDirect3DDevice9 *dev = NULL;
if(((hkIDirect3DTexture9*)(pTexture))->GetDevice(&dev) == D3D_OK)
{
if(dev == this)
{
return g_D3Ddev->SetTexture(Stage, ((hkIDirect3DTexture9*)(pTexture))->m_D3Dtex);
}
}
}
catch(...) { /* its an original texture probably*/ }
return g_D3Ddev->SetTexture(Stage, pTexture);
}
HRESULT APIENTRY hkIDirect3DTexture9::GetDevice(IDirect3DDevice9** ppDevice)
{
if(ppDevice) { (*ppDevice) = GetHKDevice(); }
return D3D_OK;
} |
Partager