Don't interact with camera when mouse is over ImGui.

This commit is contained in:
Бранимир Караџић
2021-02-05 17:24:56 -08:00
parent 176ab53d45
commit 45234794d9
4 changed files with 6 additions and 6 deletions

View File

@@ -992,7 +992,7 @@ public:
s_uniforms.m_time = time;
// Update camera.
cameraUpdate(deltaTime, m_mouseState);
cameraUpdate(deltaTime, m_mouseState, ImGui::MouseOverArea() );
cameraGetViewMtx(m_viewState.m_view);
static float lightTimeAccumulator = 0.0f;

View File

@@ -406,7 +406,7 @@ public:
}
// Update camera
cameraUpdate(deltaTime*0.15f, m_mouseState);
cameraUpdate(deltaTime*0.15f, m_mouseState, ImGui::MouseOverArea() );
// Set up matrices for gbuffer
cameraGetViewMtx(m_view);

View File

@@ -417,7 +417,7 @@ public:
m_lightModel.position[2] = bx::sin(m_lightRotation) * 3.0f;
// Update camera
cameraUpdate(deltaTime*0.15f, m_mouseState);
cameraUpdate(deltaTime*0.15f, m_mouseState, ImGui::MouseOverArea() );
// Set up matrices for gbuffer
cameraGetViewMtx(m_view);

View File

@@ -391,7 +391,7 @@ public:
}
// Update camera
cameraUpdate(deltaTime*0.15f, m_mouseState);
cameraUpdate(deltaTime*0.15f, m_mouseState, ImGui::MouseOverArea() );
cameraGetViewMtx(m_view);
@@ -883,7 +883,7 @@ public:
return 1.0f;
}
// divide edge into some number of lobes
// divide edge into some number of lobes
const float invPeriod = float(_lobeCount) / (bx::kPi2);
float periodFraction = bx::fract(_theta * invPeriod + _rotation);
@@ -907,7 +907,7 @@ public:
BX_ASSERT(0 < _lobeCount);
const uint32_t bokehSize = 128;
const bgfx::Memory* mem = bgfx::alloc(bokehSize*bokehSize*4);
bx::memSet(mem->data, 0x00, bokehSize*bokehSize*4);