Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

DirectX is COM based. Which means that pretty much every Windows game, and many applications (like Chrome) use COM, at least in part.


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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: