d3d10: Implement ID3D10EffectTechnique::GetAnnotationByIndex().
authorRico Schüller <kgbricola@web.de>
Wed, 9 Sep 2009 17:17:05 +0000 (19:17 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 10 Sep 2009 10:19:28 +0000 (12:19 +0200)
dlls/d3d10/effect.c

index 26021ee60cc879f657ea55bdb250d680bd1af7ad..07d3629bba6f515dd002cf224d8a12105356f220 100644 (file)
@@ -1392,9 +1392,22 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_GetDesc(ID3D10EffectTech
 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByIndex(
         ID3D10EffectTechnique *iface, UINT index)
 {
-    FIXME("iface %p, index %u stub!\n", iface, index);
+    struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
+    struct d3d10_effect_variable *a;
 
-    return NULL;
+    TRACE("iface %p, index %u\n", iface, index);
+
+    if (index >= This->annotation_count)
+    {
+        WARN("Invalid index specified\n");
+        return (ID3D10EffectVariable *)&null_variable;
+    }
+
+    a = &This->annotations[index];
+
+    TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
+
+    return (ID3D10EffectVariable *)a;
 }
 
 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByName(