![]() ![]() Hr = d3dDevice->CheckFormatSupport( fmt, &support ) Hr = d3dDevice->CreateTexture2D( &desc, 0, pTemp.GetAddressOf() ) ĭXGI_FORMAT fmt = EnsureNotTypeless( desc.Format ) MSAA content must be resolved before being copied to a staging texture ![]() PContext->GetDevice( d3dDevice.GetAddressOf() ) HRESULT hr = pSource->QueryInterface( _uuidof(ID3D11Texture2D), reinterpret_cast( pTexture.GetAddressOf() ) ) Return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED ) If ( resType != D3D11_RESOURCE_DIMENSION_TEXTURE2D ) Here's the code in the ScreenGrab module in DirectX Tool Kit that does this handling: static HRESULT CaptureTexture( _In_ ID3D11DeviceContext* pContext,ĭ3D11_RESOURCE_DIMENSION resType = D3D11_RESOURCE_DIMENSION_UNKNOWN In turn since ResolveSubresource returns a void, you need to check the format supports D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE before using it. You have to explicitly use ResolveSubresource before doing the copy. In particular, if your swap chain buffer is a MSAA resource this will fail to get any data. Instead you need to enable the Direct3D DEBUG device and look for any ERROR or WARNING messages. One possible point of failure is CopyResource which returns void so you can't detect the problem in your code. HRESULT hr = d3d11Device->CreateTexture2D( &description, NULL, &pNewTexture ) what really should be done is a port/implementation of dx11 in open source.First, you need to be explicitly checking the return code for all functions that returned HRESULTs HRESULT hr = SwapChain->GetBuffer( 0, _uuidof( ID3D11Texture2D ), ![]() if someone chose to compete with microsoft, they could. as apis become more general im sure the pace of new apis: will slow down, but that's not a indicator that pc gaming is dying (un informed people have claimed that the pc is dead since the ps1)Īs for the windows/other platforms discussion, it is not the fault of microsoft that there is no viable alternative on other platforms. ![]() dx 11 also allows for hardware voxel rendering /raymarching thru compute shaders and alot of other stuff. doing away with fixed functions is also great dx10 is alot more strict in terms of what the drivers should do and thats good. Dx 10 may not appear major but for devs its actually is. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |