From aea8f66202db8e08dacc6d13e6b7960ab2298668 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 2 Mar 2009 08:52:49 +0100 Subject: [PATCH] d3d10: Implement ID3D10Effect::GetTechniqueByIndex(). --- dlls/d3d10/effect.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 9f1b77eb392..96eb2f3e9e1 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -566,9 +566,22 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByIndex(ID3D10Effect *iface, UINT index) { - FIXME("iface %p, index %u stub!\n", iface, index); + struct d3d10_effect *This = (struct d3d10_effect *)iface; + struct d3d10_effect_technique *t; - return NULL; + TRACE("iface %p, index %u\n", iface, index); + + if (index >= This->technique_count) + { + WARN("Invalid index specified\n"); + return NULL; + } + + t = &This->techniques[index]; + + TRACE("Returning technique %p, \"%s\"\n", t, t->name); + + return (ID3D10EffectTechnique *)t; } static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByName(ID3D10Effect *iface,