| 430 | extern void render_reshade_effects(); |
| 431 | |
| 432 | void CLevel::OnRender() |
| 433 | { |
| 434 | inherited::OnRender(); |
| 435 | |
| 436 | Render->Calculate(); |
| 437 | Render->Render(); |
| 438 | |
| 439 | Game().OnRender(); |
| 440 | |
| 441 | //отрисовать трассы пуль |
| 442 | // Device.Statistic->TEST1.Begin(); |
| 443 | BulletManager().Render(); |
| 444 | // Device.Statistic->TEST1.End(); |
| 445 | |
| 446 | if (use_reshade) |
| 447 | render_reshade_effects(); |
| 448 | |
| 449 | auto pGameSP = smart_cast<CUIGameSP*>(HUD().GetUI()->UIGame()); |
| 450 | auto pActor = smart_cast<CActor*>(Level().CurrentEntity()); |
| 451 | CPda* Pda = pActor ? pActor->GetPDA() : nullptr; |
| 452 | const bool need_pda_render = Pda && Pda->Is3DPDA() && psActorFlags.test(AF_3D_PDA) && pGameSP->PdaMenu->IsShown(); |
| 453 | |
| 454 | if (need_pda_render) |
| 455 | { |
| 456 | Render->AfterWorldRender(); |
| 457 | |
| 458 | pGameSP->PdaMenu->Draw(); |
| 459 | |
| 460 | const CUIDialogWnd* receiver = pGameSP->MainInputReceiver(); |
| 461 | const bool is_top = receiver == pGameSP->PdaMenu; |
| 462 | |
| 463 | if (is_top || !receiver) |
| 464 | { |
| 465 | if (g_btnHint) |
| 466 | g_btnHint->OnRender(); |
| 467 | GetUICursor()->OnRender(); |
| 468 | } |
| 469 | |
| 470 | draw_wnds_rects(); |
| 471 | |
| 472 | Fvector2 cursor_pos = GetUICursor()->GetCursorPosition(); |
| 473 | Fvector2 cursor_pos_dif{cursor_pos}; |
| 474 | cursor_pos_dif.sub(pGameSP->PdaMenu->last_cursor_pos); |
| 475 | pGameSP->PdaMenu->last_cursor_pos.set(cursor_pos); |
| 476 | pGameSP->PdaMenu->MouseMovement(cursor_pos_dif.x, cursor_pos_dif.y); |
| 477 | |
| 478 | Render->AfterUIRender(); |
| 479 | } |
| 480 | |
| 481 | HUD().RenderUI(); |
| 482 | |
| 483 | if (g_btnHint) |
| 484 | g_btnHint->OnRender(); |
| 485 | |
| 486 | draw_wnds_rects(); |
| 487 | |
| 488 | #ifndef DEBUG |
| 489 |
no test coverage detected