I have wrt an game using DX11.
I want display a trangle, but only background color displayed.
And I use the InfoQueue to catch the error message
[source lang="cpp"] HRESULT hr=S_OK; if(m_device==NULL) EXCEPTION("Device not created") hr=m_device->QueryInterface(__uuidof(ID3D11Debug),(LPVOID*)&m_debug); if(FAILED(hr)) EXCEPTION("Create ID3D11Debug failed") hr=m_debug->ReportLiveDeviceObjects(D3D11_RLDO_DETAIL); if(FAILED(hr)) EXCEPTION("Set ReportLiveDeviceObjects failed") hr=m_device->QueryInterface(__uuidof(ID3D11InfoQueue),(LPVOID*)&m_infoQueue); if(FAILED(hr)) EXCEPTION("Create ID3D11InfoQueue failed") m_infoQueue->ClearStoredMessages(); m_infoQueue->ClearRetrievalFilter(); m_infoQueue->ClearStorageFilter(); D3D11_INFO_QUEUE_FILTER filter; ZeroMemory(&filter, sizeof(D3D11_INFO_QUEUE_FILTER)); D3D11_MESSAGE_SEVERITY severity; severity=D3D11_MESSAGE_SEVERITY_ERROR; filter.DenyList.NumSeverities=1; filter.DenyList.pSeverityList=&severity; m_infoQueue->AddStorageFilterEntries(&filter); m_infoQueue->AddRetrievalFilterEntries(&filter);[/source]
In the log file:
But I don't know what's the meaning of it.Create RenderTargetView: Name="unnamed", Addr=0x00FDB034, ExtRef=1, IntRef=0
Create Texture2D: Name="unnamed", Addr=0x00FDB15C, ExtRef=1, IntRef=0
Create DepthStencilState: Name="unnamed", Addr=0x00FDB334, ExtRef=1, IntRef=0
Create DepthStencilView: Name="unnamed", Addr=0x00FDB42C, ExtRef=1, IntRef=0
Because when I create the RenderTargetView,Texture2D,DepthStencilState and DepthStencilView, ther are all return S_OK.
How can I detect the bug?
And here is an other question.
Every function in ID3D11Device interface will return the HRESULT. so I can know the function run success or failed.
But the function in ID3D11DeviceContext interface have no return value.
How can I know the result?






