| 545 | } |
| 546 | |
| 547 | DXTexture::~DXTexture() |
| 548 | { |
| 549 | if ((!mPath.IsEmpty()) && (mRenderDevice != NULL)) |
| 550 | ((DXRenderDevice*)mRenderDevice)->mTextureMap.Remove(mPath); |
| 551 | |
| 552 | //OutputDebugStrF("DXTexture::~DXTexture %@\n", this); |
| 553 | delete mContentBits; |
| 554 | if (mD3DResourceView != NULL) |
| 555 | mD3DResourceView->Release(); |
| 556 | if (mD3DDepthStencilView != NULL) |
| 557 | mD3DDepthStencilView->Release(); |
| 558 | if (mD3DDepthBuffer != NULL) |
| 559 | mD3DDepthBuffer->Release(); |
| 560 | if (mD3DTexture != NULL) |
| 561 | mD3DTexture->Release(); |
| 562 | if (mRenderDevice != NULL) |
| 563 | mRenderDevice->mTextures.Remove(this); |
| 564 | } |
| 565 | |
| 566 | void DXTexture::ReleaseNative() |
| 567 | { |