Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DXGI_SWAP_CHAIN_DESC desc={0};
- desc.BufferCount=1;
- desc.BufferDesc.Width=width;
- desc.BufferDesc.Height=height;
- desc.BufferDesc.Format=DXGI_FORMAT_R8G8B8A8_UNORM;
- desc.BufferUsage=DXGI_USAGE_RENDER_TARGET_OUTPUT;
- desc.OutputWindow=(HWND)window;
- desc.SampleDesc.Count=1;
- desc.SampleDesc.Quality=0;
- desc.Windowed=TRUE;
- HRESULT hr=D3D10CreateDeviceAndSwapChain(
- NULL,
- D3D10_DRIVER_TYPE_HARDWARE,
- NULL,
- #if (_DEBUG)
- D3D10_CREATE_DEVICE_DEBUG,
- #else
- 0,
- #endif
- D3D10_SDK_VERSION,
- &desc,
- &mpSwapChain,
- &mpDevice);
- if(hr!=S_OK) {
- Log::Fatal("Could not create render device - CreateDeviceAndSwapChain failed!");
- return false;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement