Am 28.04.2016 um 20:17 schrieb Aaryaman Vasishta jem456.vasishta@gmail.com:
@@ -198,13 +198,24 @@ static HRESULT WINAPI d3drm1_CreateTexture(IDirect3DRM *iface, struct d3drm_texture *object; HRESULT hr;
- FIXME("iface %p, image %p, texture %p partial stub.\n", iface, image, texture);
TRACE("iface %p, image %p, texture %p.\n", iface, image, texture);
if (!d3drm_validate_image(image))
return D3DRMERR_BADVALUE;
if (FAILED(hr = d3drm_texture_create(&object)))
{
d3drm_texture_destroy(object); return hr;
}
object->d3drm = iface;
object->initialized = TRUE;
object->image = image;
*texture = &object->IDirect3DRMTexture_iface;
IDirect3DRM_AddRef(iface);
return D3DRM_OK;
}
Is there anything wrong with calling Texture3::InitFromImage here, or even calling IDirect3DRM3::CreateTexture? in D3DRM1::CreateTexture and D3DRM2::CreateTexture?
Not really, I thought that since InitFromImage doesn't exist for version 1, I wasn't sure if it's a good idea to use it within CreateTexture for version 1. Is it fine, though?. I'll use InitFromImage if it's a better approach. Besides, since they behave the same so far, there's no reason to not use it anyways.
I agree with thunking version 2's CreateTexture to version 3, I'll resend the patch for the same, after I get to know your opinion for the above question.
Cheers, Aaryaman
On Fri, Apr 29, 2016 at 1:06 PM, Stefan Dösinger stefandoesinger@gmail.com wrote:
Am 28.04.2016 um 20:17 schrieb Aaryaman Vasishta <
jem456.vasishta@gmail.com>:
@@ -198,13 +198,24 @@ static HRESULT WINAPI
d3drm1_CreateTexture(IDirect3DRM *iface,
struct d3drm_texture *object; HRESULT hr;
- FIXME("iface %p, image %p, texture %p partial stub.\n", iface,
image, texture);
TRACE("iface %p, image %p, texture %p.\n", iface, image, texture);
if (!d3drm_validate_image(image))
return D3DRMERR_BADVALUE;
if (FAILED(hr = d3drm_texture_create(&object)))
{
d3drm_texture_destroy(object); return hr;
}
object->d3drm = iface;
object->initialized = TRUE;
object->image = image;
*texture = &object->IDirect3DRMTexture_iface;
IDirect3DRM_AddRef(iface);
return D3DRM_OK;
}
Is there anything wrong with calling Texture3::InitFromImage here, or even calling IDirect3DRM3::CreateTexture? in D3DRM1::CreateTexture and D3DRM2::CreateTexture?
Hi,
I'd thunk CreateTexture1 -> CreateTexture3, CreateTexture2->CreateTexture3 and implement CreateTexture3 via CreateObject + InitFromImage - unless there's some behavior difference in those methods that prevents you from doing this.
Cheers, Stefan
Am 29.04.2016 um 11:25 schrieb Aaryaman Vasishta jem456.vasishta@gmail.com:
Not really, I thought that since InitFromImage doesn't exist for version 1, I wasn't sure if it's a good idea to use it within CreateTexture for version 1. Is it fine, though?. I'll use InitFromImage if it's a better approach. Besides, since they behave the same so far, there's no reason to not use it anyways.
I agree with thunking version 2's CreateTexture to version 3, I'll resend the patch for the same, after I get to know your opinion for the above question.
Cheers, Aaryaman
On Fri, Apr 29, 2016 at 1:06 PM, Stefan Dösinger stefandoesinger@gmail.com wrote:
Am 28.04.2016 um 20:17 schrieb Aaryaman Vasishta jem456.vasishta@gmail.com:
@@ -198,13 +198,24 @@ static HRESULT WINAPI d3drm1_CreateTexture(IDirect3DRM *iface, struct d3drm_texture *object; HRESULT hr;
- FIXME("iface %p, image %p, texture %p partial stub.\n", iface, image, texture);
TRACE("iface %p, image %p, texture %p.\n", iface, image, texture);
if (!d3drm_validate_image(image))
return D3DRMERR_BADVALUE;
if (FAILED(hr = d3drm_texture_create(&object)))
{
d3drm_texture_destroy(object); return hr;
}
object->d3drm = iface;
object->initialized = TRUE;
object->image = image;
*texture = &object->IDirect3DRMTexture_iface;
IDirect3DRM_AddRef(iface);
return D3DRM_OK;
}
Is there anything wrong with calling Texture3::InitFromImage here, or even calling IDirect3DRM3::CreateTexture? in D3DRM1::CreateTexture and D3DRM2::CreateTexture?
Hi,
I've already submitted a patch with the exact same changes. See https://source.winehq.org/patches/data/121990
Cheers, Aaryaman
On Mon, May 2, 2016 at 1:42 AM, Stefan Dösinger stefandoesinger@gmail.com wrote:
Hi,
I'd thunk CreateTexture1 -> CreateTexture3, CreateTexture2->CreateTexture3 and implement CreateTexture3 via CreateObject + InitFromImage - unless there's some behavior difference in those methods that prevents you from doing this.
Cheers, Stefan
Am 29.04.2016 um 11:25 schrieb Aaryaman Vasishta < jem456.vasishta@gmail.com>:
Not really, I thought that since InitFromImage doesn't exist for version
1, I wasn't sure if it's a good idea to use it within CreateTexture for version 1.
Is it fine, though?. I'll use InitFromImage if it's a better approach.
Besides, since they behave the same so far, there's no reason to not use it anyways.
I agree with thunking version 2's CreateTexture to version 3, I'll
resend the patch for the same, after I get to know your opinion for the above question.
Cheers, Aaryaman
On Fri, Apr 29, 2016 at 1:06 PM, Stefan Dösinger <
stefandoesinger@gmail.com> wrote:
Am 28.04.2016 um 20:17 schrieb Aaryaman Vasishta <
jem456.vasishta@gmail.com>:
@@ -198,13 +198,24 @@ static HRESULT WINAPI
d3drm1_CreateTexture(IDirect3DRM *iface,
struct d3drm_texture *object; HRESULT hr;
- FIXME("iface %p, image %p, texture %p partial stub.\n", iface,
image, texture);
TRACE("iface %p, image %p, texture %p.\n", iface, image, texture);
if (!d3drm_validate_image(image))
return D3DRMERR_BADVALUE;
if (FAILED(hr = d3drm_texture_create(&object)))
{
d3drm_texture_destroy(object); return hr;
}
object->d3drm = iface;
object->initialized = TRUE;
object->image = image;
*texture = &object->IDirect3DRMTexture_iface;
IDirect3DRM_AddRef(iface);
return D3DRM_OK;
}
Is there anything wrong with calling Texture3::InitFromImage here, or
even calling IDirect3DRM3::CreateTexture? in D3DRM1::CreateTexture and D3DRM2::CreateTexture?