MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / RenderViewport

Function RenderViewport

src/openrct2/interface/Screenshot.cpp:312–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312static void RenderViewport(IDrawingEngine* drawingEngine, const Viewport& viewport, RenderTarget& rt)
313{
314 // Ensure sprites appear regardless of rotation
315 ResetAllSpriteQuadrantPlacements();
316
317 std::unique_ptr<X8DrawingEngine> tempDrawingEngine;
318 if (drawingEngine == nullptr)
319 {
320 tempDrawingEngine = std::make_unique<X8DrawingEngine>(GetContext()->GetUiContext());
321 drawingEngine = tempDrawingEngine.get();
322 }
323
324 tempDrawingEngine->BeginDraw();
325
326 rt.DrawingEngine = drawingEngine;
327 ViewportRender(rt, &viewport);
328
329 tempDrawingEngine->EndDraw();
330}
331
332void ScreenshotGiant()
333{

Callers 3

ScreenshotGiantFunction · 0.85
CommandLineForScreenshotFunction · 0.85
CaptureImageFunction · 0.85

Calls 6

GetContextFunction · 0.85
ViewportRenderFunction · 0.85
getMethod · 0.65
BeginDrawMethod · 0.45
EndDrawMethod · 0.45

Tested by

no test coverage detected