Monday, 14 September 2009

DirectWrite and Direct2D1

I've added Delphi interface units for DirectWrite and Direct2D1.

I've kept them as separate units (even though there is a small amount of interdependency) because MS say that DirectWrite can render to an arbitrary renderer.

These compile, and I've done minimal testing (e.g. the "Hello World!" test application that you can download).


PS: I've just seen that Delphi 2010 includes a version of D2D1, but not Direct3D 11 etc.


  1. 1. D2D1_JSB: Note - Why not emplement CreateWicBitmapRenderTarget?
    Code: «Target:IUnknown {JSB: To do: IWICBitmap};»
    2. DXGI_JSB: Error - TLUID type is undefined.

  2. Hi,

    Thanks for the feedback.

    IWICBitmap and IWICBitmapSource are defined in Wincodec.h. If you have ported Wincodec.h to Delphi then you can add your unit to the D2D1_JSB "uses" list, and correct the two "to do" lines in D2D1_JSB.

    I didn't want to do this myself because it would require everyone using D2D1 to also use Wincodec_JSB.

    I think you should be able to pass IWICBitmap and IWICBitmapSource parameters to my D2D1_JSB methods without any problems, other than a loss of static type checking.

    I'll get the TLUID omission fixed when I can.

    All the best,