mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[WINESYNC] d3dx9: Merge the d3dx_effect_GetTechniqueByName() helper.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id a2e0046fc52c4e08a64cbe76c78f184e7d5b27d2 by Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
97475aa65c
commit
570dd1c48a
2 changed files with 12 additions and 18 deletions
|
@ -1174,22 +1174,6 @@ static D3DXHANDLE d3dx9_base_effect_get_technique(struct d3dx9_base_effect *base
|
|||
return get_technique_handle(&base->techniques[index]);
|
||||
}
|
||||
|
||||
static D3DXHANDLE d3dx9_base_effect_get_technique_by_name(struct d3dx9_base_effect *base, const char *name)
|
||||
{
|
||||
struct d3dx_technique *tech = get_technique_by_name(base, name);
|
||||
|
||||
if (tech)
|
||||
{
|
||||
D3DXHANDLE t = get_technique_handle(tech);
|
||||
TRACE("Returning technique %p\n", t);
|
||||
return t;
|
||||
}
|
||||
|
||||
WARN("Technique not found.\n");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXHANDLE object,
|
||||
struct d3dx_parameter **annotations)
|
||||
{
|
||||
|
@ -3382,10 +3366,20 @@ static D3DXHANDLE WINAPI d3dx_effect_GetTechnique(ID3DXEffect *iface, UINT index
|
|||
static D3DXHANDLE WINAPI d3dx_effect_GetTechniqueByName(ID3DXEffect *iface, const char *name)
|
||||
{
|
||||
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
|
||||
struct d3dx_technique *tech = get_technique_by_name(&effect->base_effect, name);
|
||||
|
||||
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
||||
|
||||
return d3dx9_base_effect_get_technique_by_name(&effect->base_effect, name);
|
||||
if (tech)
|
||||
{
|
||||
D3DXHANDLE t = get_technique_handle(tech);
|
||||
TRACE("Returning technique %p\n", t);
|
||||
return t;
|
||||
}
|
||||
|
||||
WARN("Technique not found.\n");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static D3DXHANDLE WINAPI d3dx_effect_GetPass(ID3DXEffect *iface, D3DXHANDLE technique, UINT index)
|
||||
|
|
|
@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc
|
|||
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
|
||||
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
|
||||
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
|
||||
tags: {wine: 10aa0819138f4aaf0f872de74eaf953326afe997}
|
||||
tags: {wine: a2e0046fc52c4e08a64cbe76c78f184e7d5b27d2}
|
||||
|
|
Loading…
Reference in a new issue