[dx9-12] Major change to desgin

Ann and Jason Edmeades us at the-edmeades.demon.co.uk
Fri Oct 22 17:08:50 CDT 2004

>No, you really should extend IUnknown, it's going to be massively
>confusing otherwise.

Ok, so if I put back the IUnknowns, are you happy if the AddRefs in the d3dx
calls AddRef on the WineD3D version?

>Please do proper reference counting, it doesn't cost anything, and
>someday we might need it. If you can't use standard ref counting it
>probably means you are doing something wrong.

The problem I was trying to avoid was someone doing an addref for the
wined3d object, but not the d3dx equivalent, as there really is a strict
mapping between instances. If I put back the IUnknown, then addref/release
in wined3d should NEVER be called from within wined3d - Does this make

>You don't have to include any of the headers, that's the whole point
>of interfaces. Just have wined3d export an IWineD3DUser interface and
>have both d3d8 and d3d9 implement it. wined3d doesn't have to know
>anything about the implementation, just like d3d8 and d3d9 don't have
>to know anything about the implementation of IWineD3D.

I may have misunderstood what you mean by this paragraph and I think I am
getting confused. The wined3d layer needs a way of passing back the d3dx
equivalent, and therefore it needs to store it in the _impl structure. Here,
I dont care what it is called, but since internally to wined3d it only ever
needs the IUnknown methods, that does make sense. However, it needs to
expose it somehow, which is why I added a GetParent call to each of the
interfaces. I *think* you mean I could define a wined3d interface with just
that method in, and then have IWineD3D inherit from IWineD3DGetParent
inherit from IUnknown. If this is right, for a single method is it worth it?

Sorry ig I missed your point here

More information about the wine-devel mailing list