--------------------------------- Viewport::c-tor Construct a viewport from a glArea
| 46 | // Construct a viewport from a glArea |
| 47 | // |
| 48 | Viewport::Viewport(I_RenderArea* const area) |
| 49 | : m_Area(area) |
| 50 | { |
| 51 | RegisterAsTriggerer(); |
| 52 | |
| 53 | m_Area->SetOnInit(std::function<void(I_GraphicsApiContext* const)>(std::bind(&Viewport::OnRealize, this, std::placeholders::_1))); |
| 54 | m_Area->SetOnDeinit(std::function<void()>(std::bind(&Viewport::OnUnrealize, this))); |
| 55 | m_Area->SetOnResize(std::function<void(vec2 const)>(std::bind(&Viewport::OnResize, this, std::placeholders::_1))); |
| 56 | m_Area->SetOnRender(std::function<void(T_FbLoc const)>(std::bind(&Viewport::OnRender, this, std::placeholders::_1))); |
| 57 | } |
| 58 | |
| 59 | //--------------------------------- |
| 60 | // Viewport::d-tor |
nothing calls this directly
no test coverage detected