mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 12:25:30 +00:00
Core implementation of Physical Based Rendering.
This commit is contained in:
parent
54f1d8c18e
commit
b4a1d18f42
148 changed files with 4464 additions and 1016 deletions
|
|
@ -32,7 +32,8 @@
|
|||
|
||||
GFXD3D11OcclusionQuery::GFXD3D11OcclusionQuery(GFXDevice *device)
|
||||
: GFXOcclusionQuery(device),
|
||||
mQuery(NULL)
|
||||
mQuery(NULL),
|
||||
mTesting(false)
|
||||
{
|
||||
#ifdef TORQUE_GATHER_METRICS
|
||||
mTimer = PlatformTimer::create();
|
||||
|
|
@ -73,8 +74,11 @@ bool GFXD3D11OcclusionQuery::begin()
|
|||
AssertISV(hRes != E_OUTOFMEMORY, "GFXD3D11OcclusionQuery::begin - Out of memory");
|
||||
}
|
||||
|
||||
// Add a begin marker to the command buffer queue.
|
||||
D3D11DEVICECONTEXT->Begin(mQuery);
|
||||
if (!mTesting)
|
||||
{
|
||||
D3D11DEVICECONTEXT->Begin(mQuery);
|
||||
mTesting = true;
|
||||
}
|
||||
|
||||
#ifdef TORQUE_GATHER_METRICS
|
||||
mBeginFrame = GuiTSCtrl::getFrameCount();
|
||||
|
|
@ -90,6 +94,7 @@ void GFXD3D11OcclusionQuery::end()
|
|||
|
||||
// Add an end marker to the command buffer queue.
|
||||
D3D11DEVICECONTEXT->End(mQuery);
|
||||
mTesting = false;
|
||||
|
||||
#ifdef TORQUE_GATHER_METRICS
|
||||
AssertFatal( mBeginFrame == GuiTSCtrl::getFrameCount(), "GFXD3D11OcclusionQuery::end - ended query on different frame than begin!" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue