Пример #1
0
static void CreateDeviceSwapChainBitmap(Dxgi::SwapChain const & swapChain,
                                        DeviceContext const & target)
{
    auto props = BitmapProperties1(BitmapOptions::Target | BitmapOptions::CannotDraw,
                                   PixelFormat(Dxgi::Format::B8G8R8A8_UNORM, AlphaMode::Ignore));

    target.SetTarget(target.CreateBitmapFromDxgiSurface(swapChain,
                                                        props));
}
Пример #2
0
static void ResizeSwapChainBitmap()
{
    target.SetTarget();

    if (S_OK == swapChain.ResizeBuffers())
    {
        CreateDeviceSwapChainBitmap(swapChain,
                                    target);
    }
    else
    {
        ReleaseDevice();
    }
}