Added C-like API for D3DTexture