Examples/PhysicsDemo: Remove useless code

This commit is contained in:
Jérôme Leclercq 2021-07-11 11:18:01 +02:00
parent 863fb3ea7e
commit 0777badbe0
1 changed files with 0 additions and 15 deletions

View File

@ -190,7 +190,6 @@ int main()
Nz::PidController<Nz::Vector3f> upController(1.f, 0.f, 0.1f); Nz::PidController<Nz::Vector3f> upController(1.f, 0.f, 0.1f);
bool showColliders = false; bool showColliders = false;
bool rebuildCommandBuffer = false;
while (window.IsOpen()) while (window.IsOpen())
{ {
Nz::UInt64 now = Nz::GetElapsedMicroseconds(); Nz::UInt64 now = Nz::GetElapsedMicroseconds();
@ -208,10 +207,7 @@ int main()
case Nz::WindowEventType::KeyPressed: case Nz::WindowEventType::KeyPressed:
if (event.key.virtualKey == Nz::Keyboard::VKey::A) if (event.key.virtualKey == Nz::Keyboard::VKey::A)
{
basicMat.EnableAlphaTest(!basicMat.IsAlphaTestEnabled()); basicMat.EnableAlphaTest(!basicMat.IsAlphaTestEnabled());
rebuildCommandBuffer = true;
}
else if (event.key.virtualKey == Nz::Keyboard::VKey::B) else if (event.key.virtualKey == Nz::Keyboard::VKey::B)
{ {
showColliders = !showColliders; showColliders = !showColliders;
@ -233,7 +229,6 @@ int main()
registry.patch<Nz::GraphicsComponent>(entity); registry.patch<Nz::GraphicsComponent>(entity);
} }
} }
rebuildCommandBuffer = true;
} }
break; break;
@ -253,14 +248,6 @@ int main()
break; break;
} }
case Nz::WindowEventType::Resized:
{
Nz::Vector2ui windowSize = window.GetSize();
//viewerInstance.UpdateProjectionMatrix(Nz::Matrix4f::Perspective(Nz::DegreeAnglef(70.f), float(windowSize.x) / windowSize.y, 0.1f, 1000.f));
//viewerInstance.UpdateTargetSize(Nz::Vector2f(windowSize));
break;
}
default: default:
break; break;
} }
@ -319,8 +306,6 @@ int main()
window.Display(); window.Display();
rebuildCommandBuffer = false;
fps++; fps++;
if (secondClock.GetMilliseconds() >= 1000) if (secondClock.GetMilliseconds() >= 1000)