该代码在VS中DirectXApp项目中常见。比如这样: DX::ThrowIfFailed( m_deviceResources->GetD3DDevice()->CreatePixelShader( &fileData[0], fileData.size(), nullptr, &m_pixelShader ) ); 1. 2. 3. 4. 5. 6. 7. 8. 这段代码并不是在出错的时候执行!而是一定会执行,但是在出错的时候会自动跳转到...
D2DResourceLockconst& lock,floatnewWidth,floatnewHeight,floatnewDpi, DirectXPixelFormat newFormat,int32_tbufferCount) {autoswapChain = As<IDXGISwapChain2>(GetResource());intwidthInPixels = SizeDipsToPixels(newWidth, newDpi);intheightInPixels = SizeDipsToPixels(newHeight, newDpi); ThrowIfNegative...