dotnet/Silk.NET

Cannot create ID2D1Bitmap1 by calling ID2D1DeviceContext::CreateBitmap

TonyDragonlake opened this issue · 0 comments

I hope to make a ID2D1Bitmap1 by calling ID2D1DeviceContext.CreateBitmap method, but it only has the ID2DBitmap version.

I need to make this bitmap accessible to the CPU, so BitmapProperties1 is necessary because it has an additional public field public BitmapOptions BitmapOptions; that BitmapProperties doesn't have.

Here is the api code from Direct2D API website.

HRESULT CreateBitmap(
                 D2D1_SIZE_U                     size,
  [in, optional] const void                      *sourceData,
                 UINT32                          pitch,
  [in]           const D2D1_BITMAP_PROPERTIES1 & bitmapProperties,
  [out]          ID2D1Bitmap1                    **bitmap
);

Please add ID2D1DeviceContext.CreateBitmap method for ID2D1Bitmap1 version.