mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Don't interact with camera when mouse is over ImGui.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user