MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / BeginOcclusionQuery

Method BeginOcclusionQuery

GTE/Graphics/DX11/DX11Engine.cpp:822–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820}
821
822ID3D11Query* DX11Engine::BeginOcclusionQuery()
823{
824 D3D11_QUERY_DESC desc{};
825 ZeroMemory(&desc, sizeof(desc));
826 desc.Query = D3D11_QUERY_OCCLUSION;
827 desc.MiscFlags = D3D11_QUERY_MISC_NONE;
828 ID3D11Query* occlusionQuery = nullptr;
829 HRESULT hr = mDevice->CreateQuery(&desc, &occlusionQuery);
830 if (SUCCEEDED(hr))
831 {
832 mImmediate->Begin(occlusionQuery);
833 return occlusionQuery;
834 }
835
836 LogError("CreateQuery failed.");
837}
838
839uint64_t DX11Engine::EndOcclusionQuery(ID3D11Query* occlusionQuery)
840{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected