Rico Schüller : d3d10: Implement ID3D10EffectTechnique ::GetAnnotationByIndex().

Alexandre Julliard julliard at winehq.org
Thu Sep 10 09:08:44 CDT 2009


Module: wine
Branch: master
Commit: d12dcbe85279b59b2699bff8460dcf4469b0018a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d12dcbe85279b59b2699bff8460dcf4469b0018a

Author: Rico Schüller <kgbricola at web.de>
Date:   Wed Sep  9 19:17:05 2009 +0200

d3d10: Implement ID3D10EffectTechnique::GetAnnotationByIndex().

---

 dlls/d3d10/effect.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 26021ee..07d3629 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -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(




More information about the wine-cvs mailing list