On 24 June 2010 05:18, Misha Koshelev <misha680 at gmail.com> wrote:
+#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define ID3DXMesh_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define ID3DXMesh_AddRef(p) (p)->lpVtbl->AddRef(p) +#define ID3DXMesh_Release(p) (p)->lpVtbl->Release(p) +#else +/*** IUnknown methods ***/ +#define ID3DXMesh_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define ID3DXMesh_AddRef(p) (p)->AddRef() +#define ID3DXMesh_Release(p) (p)->Release() +#endif
Which version of the DX SDK do these match?
Ok, now here I just have to plead ignorance my apologies...
If I do not declare these functions, how do I call the Release method of the appropriate interfaces?
Specifically, I started looking at the test for line.c - I believe that if I create a mesh, I have to release it.
I have largely been learning from this page: http://www.mvps.org/directx/articles/d3dxmesh.htm (which is DirectX 8) but it seems I have to somehow release the functions no?
Also, I'm probably going to start with the D3DXCreateBox function, as I need to figure out exactly what's going on with the vertices before I delve into something as complicated as spheres ;)
Thanks y'all :)
Misha