MCPcopy Create free account
hub / github.com/Illation/ETEngine / Viewport

Method Viewport

Engine/source/EtRendering/GraphicsContext/Viewport.cpp:48–57  ·  view source on GitHub ↗

--------------------------------- Viewport::c-tor Construct a viewport from a glArea

Source from the content-addressed store, hash-verified

46// Construct a viewport from a glArea
47//
48Viewport::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

Callers

nothing calls this directly

Calls 4

SetOnInitMethod · 0.45
SetOnDeinitMethod · 0.45
SetOnResizeMethod · 0.45
SetOnRenderMethod · 0.45

Tested by

no test coverage detected