<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 25, 2016 at 1:12 AM, Henri Verbeet <span dir="ltr"><<a href="mailto:hverbeet@gmail.com" target="_blank">hverbeet@gmail.com</a>></span> wrote:<span></span><br><span></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
</span>Sure, but it's useful to have some idea what those functions are<br>
supposed to do. Right now, I think it looks like you should be able to<br>
implement LoadTexture() by creating a texture and then calling<br>
InitFromFile() on it. And related to above, InitFromFile() should then<br>
probably check that the texture hasn't been initialised before.<br></blockquote><div>I wrote a quick test, and it seems that InitFromFile always returns D3DRMERR_BADOBJECT, even after passing it an IDirect3DRMTexture created via CreateTexture. It even fails on version 3 (my suspicion was that maybe version 1 and 2 were deprecated and version 3 works, but that doesn't seem the case). I ran them on my windows machine, but I can send a diff to the testbot if you want.<br><br></div><div>CreateTexture will also only work when it's fed with a complete and valid image struct. Passing NULL to buffer1 made it fail again. I can confirm that CreateTexture only keeps a pointer copy to the application-created image struct, instead of deep copying the contents of it in seperate memory.<br></div><div><br>The docs have also been pretty vague about the type of file that InitFromFile wants, describing the filename parameter as "A string that specifies the file from which the texture initialization 
information is drawn". I suspect that it might be some proprietary format specifying the contents of an image struct, along with the buffer arrays. But I could be wrong. For now I'll include all your other suggestions and leave this for further discussion, while I submit the improved patch.<br><br></div><div>Thanks for the review and clarifications!<br></div><div><br></div><div>Cheers,<br></div><div>Aaryaman<br></div></div><br></div></div>