You can check if your normal ID2D1RenderTarget/ID2D1HwndRenderTarget/ID2D1DCRenderTarget from the TDirect2DCanvas supports the newer Direct2D 1.1 ID2D1DeviceContext.
Something like this:
// Self.Handle is the HWND of your Form...
FVCLCanvas := TDirect2DCanvas.Create(Self.Handle);
var DeviceContext: ID2D1DeviceContext;
if Supports(FVCLCanvas.RenderTarget, ID2D1DeviceContext, DeviceContext) then
begin
var YourPointer: Pointer;
var DontForgetThePitch := 1024;
var AllImportantBitmapProperties: D2D1_BITMAP_PROPERTIES1;
var D2D1Bitmap: ID2D1Bitmap1;
DeviceContext.CreateBitmap(SizeU(1024,1024), YourPointer, DontForgetThePitch, @AllImportantBitmapProperties, D2D1Bitmap);
DeviceContext.DrawImage(D2D1Bitmap, nil, nil, D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC);
end;
I assume you will find out the details on your own (Fill the Pointer to your Data, Pitch, Bitmap props).
Or you build the entire Direct 2D 1.1 - 1.3 thing by yourself and forget the crappy TDirect2DCanvas.
Microsoft had a lot of DirectX samples and all of them have a abstract class called "DirectXBase" (e.g. https://github.com/microsoft/VCSamples/blob/master/VC2012Samples/Windows 8 samples/C%2B%2B/Windows 8 app samples/Direct2D interpolation modes sample (Windows 8)/C%2B%2B/DirectXBase.cpp).
You can use the attachment pascal unit as a starting point.
I recommend the header translations from MfPack (https://github.com/FactoryXCode/MfPack) for this.
DirectXBase.pas