I'm trying to implement DX11 in my C++Builder project. All SDK references use the ComPtr<>
template, eg:
// Create the DX11 API device object, and get a corresponding context.
ComPtr<ID3D11Device> device;
ComPtr<ID3D11DeviceContext> context;
Of course, C++Builder doesn't know ComPtr
, so how can I include it, or port over the ComPtr
template? Basically, get it to work in C++Builder.
UPDATE
So, someone asked me about the headers. Obviously, I don't have the needed header, hence I'm asking here for a solution.
#include <vcl.h>
#include <winuser.h>
#include <d2d1.h>
#include <d3d11.h>
According to Microsoft, I should include <client.h>
, but that one can't be found by C++Builder.
ATL::CComPtr
is a Microsoft class. I believe that it's in Microsoft's atlcom.h or atlcomcli.h. There will be an MFC equivalent.If you don't have Visual Studio, the template will be like: