Hacker News new | ask | show | jobs
by thrower123 2439 days ago
I've done a fair amount of work with DirectX, and I've never particularly had to be cognizant that it used COM.

That's probably more a reflection of DirectX being reasonably well designed.

2 comments

It's mostly a reflection of the fact that you don't have to implement COM interfaces to use DirectX—you only have to call them. Also, the constructors are wrapped in functions like D3D11CreateDevice() so that you don't have to use raw functions like CoCreateInstance().

If you're using an API like DirectWrite (at least older versions) that requires you to implement interfaces to do basic things like load fonts from memory, then the COM underpinnings of the APIs become very apparent.

That's because there are two COMs:

1. The good COM, which is just a class-like ABI.

2. The horrible OLE COM, which allowed you to embed Word docs in Excel and the like which is what most people associate with COM.