MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / InitDisplay

Function InitDisplay

Source/TestRenderer/AndroidMain.cpp:68–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static void InitDisplay(ANativeWindow *window) {
69 if (!appInitialized) {
70 appInitialized = true;
71
72 currentWindowWidth = ANativeWindow_getWidth(window);
73 currentWindowHeight = ANativeWindow_getHeight(window);
74
75 ::app.Init(window);
76
77 ::app.LoadResources();
78
79 mainContext = BE1::rhi.CreateContext(window, false);
80
81 mainRenderTarget = ::app.CreateRenderTarget(mainContext);
82
83 BE1::rhi.SetContextDisplayFunc(mainContext, DisplayMainContext, nullptr, false);
84 } else {
85 BE1::rhi.ActivateSurface(mainContext, window);
86 }
87}
88
89/*
90 * AcquireASensorManagerInstance(android_app* app)

Callers 1

HandleCmdFunction · 0.70

Calls 6

LoadResourcesMethod · 0.80
InitMethod · 0.45
CreateContextMethod · 0.45
CreateRenderTargetMethod · 0.45
SetContextDisplayFuncMethod · 0.45
ActivateSurfaceMethod · 0.45

Tested by

no test coverage detected