[PATCH 2/2] d3drm: Partially Implement IDirect3DRM*::LoadTexture(v2).

Aaryaman Vasishta jem456.vasishta at gmail.com
Sat Mar 26 04:19:54 CDT 2016


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.


On Sat, Mar 26, 2016 at 2:46 PM, Aaryaman Vasishta <
jem456.vasishta at gmail.com> wrote:

> For now I used CreateTexture (as the documentation suggested) another way
> is CreateTextureFromSurface, but that didn't work either (after passing it
> an off-screen plain surface).
>
> I called IDirect3DRM3_CreateObject(d3drm3, &CLSID_CDirect3DRMTexture,
> NULL, &IID_IDirect3DRMTexture3, &texture3), which works, then calling
> InitFromFile on texture3 also returns successfully. It seems that if the
> image struct is not set within the object, only then InitFromFile works (as
> InitFromFile didn't work when called on a texture created from LoadTexture
> or CreateTexture, both of which initialize the image struct member).
>
> On Sat, Mar 26, 2016 at 3:03 AM, Henri Verbeet <hverbeet at gmail.com> wrote:
>
>> On 25 March 2016 at 22:20, Aaryaman Vasishta <jem456.vasishta at gmail.com>
>> wrote:
>> > I wrote a quick test, and it seems that InitFromFile always returns
>> > D3DRMERR_BADOBJECT, even after passing it an IDirect3DRMTexture created
>> via
>> > CreateTexture.
>> How are you creating the texture? The interesting cases are probably
>> CoCreateInstance() and IDirect3DRM_CreateObject().
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160326/cfb129aa/attachment-0001.html>


More information about the wine-devel mailing list