On 26 March 2016 at 10:19, Aaryaman Vasishta jem456.vasishta@gmail.com wrote:
What can probably be done is, making InitFromFile call d3drm_create_image, checking if D3DRMIMAGE struct isn't set already, and LoadTexture will call InitFromFIle (on a fresh new object every time LoadTexture is called), whereas CreateTexture will merely HeapAlloc the object and assign the image supplied by the application.
CreateTexture() should probably call InitFromImage(), or some equivalent, although it's odd that that only exists since IDirect3DRMTexture2. It would also be interesting to know if CoCreateObject() works, mainly because you can't pass the IDirect3DRM interface to the texture in that case.