| 51 | } |
| 52 | |
| 53 | void OvEditor::Panels::AView::Render() |
| 54 | { |
| 55 | auto [winWidth, winHeight] = GetSafeSize(); |
| 56 | m_image->size = OvMaths::FVector2(static_cast<float>(winWidth), static_cast<float>(winHeight)); |
| 57 | |
| 58 | auto camera = GetCamera(); |
| 59 | auto scene = GetScene(); |
| 60 | |
| 61 | if (winWidth > 0 && winHeight > 0 && camera && scene) |
| 62 | { |
| 63 | FrameMarkStart(name.c_str()); |
| 64 | |
| 65 | m_framebuffer.Resize(winWidth, winHeight); |
| 66 | |
| 67 | InitFrame(); |
| 68 | |
| 69 | OvRendering::Data::FrameDescriptor frameDescriptor; |
| 70 | frameDescriptor.renderWidth = winWidth; |
| 71 | frameDescriptor.renderHeight = winHeight; |
| 72 | frameDescriptor.camera = camera; |
| 73 | frameDescriptor.outputBuffer = m_framebuffer; |
| 74 | |
| 75 | m_renderer->BeginFrame(frameDescriptor); |
| 76 | DrawFrame(); |
| 77 | m_renderer->EndFrame(); |
| 78 | FrameMarkEnd(name.c_str()); |
| 79 | EDITOR_CONTEXT(driver)->OnFrameCompleted(); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | void OvEditor::Panels::AView::DrawFrame() |
| 84 | { |
no test coverage detected