Commit a2e0046f authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

d3dx9: Merge the d3dx_effect_GetTechniqueByName() helper.

parent 10aa0819
......@@ -1170,22 +1170,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)
{
......@@ -3378,10 +3362,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment