// Copyright (c) 2008-2023 the Urho3D project // License: MIT #include "AppState_Benchmark04.h" #include "AppStateManager.h" #include #include #include #include #include #include using namespace Urho3D; void AppState_Benchmark04::OnEnter() { assert(!scene_); // Сцена и вьюпорт не нужны GetSubsystem()->SetMouseVisible(false); SubscribeToEvent(E_ENDALLVIEWSRENDER, URHO3D_HANDLER(AppState_Benchmark04, HandleEndAllViewsRender)); fpsCounter_.Clear(); spriteBatch_ = new SpriteBatch(context_); } void AppState_Benchmark04::OnLeave() { UnsubscribeFromAllEvents(); spriteBatch_ = nullptr; } void AppState_Benchmark04::HandleEndAllViewsRender(StringHash eventType, VariantMap& eventData) { float timeStep = GetSubsystem