MCPcopy Create free account
hub / github.com/defold/defold / EngineCreate

Function EngineCreate

engine/platform/src/test/test_platform_app.cpp:135–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135static void* EngineCreate(int argc, char** argv)
136{
137 EngineCtx* engine = &g_EngineCtx;
138
139 engine->m_WasCreated++;
140 engine->m_TimeStart = dmTime::GetMonotonicTime();
141
142 WindowCreateParams params;
143 WindowCreateParamsInitialize(&params);
144 params.m_Width = 512;
145 params.m_Height = 512;
146 params.m_GraphicsApi = WINDOW_GRAPHICS_API_OPENGL;
147 params.m_Title = "Test app";
148 params.m_ContextAlphabits = 8;
149
150 engine->m_Window = dmPlatform::NewWindow();
151
152 dmPlatform::OpenWindow(engine->m_Window, params);
153 dmPlatform::ShowWindow(engine->m_Window);
154
155 return &g_EngineCtx;
156}
157
158static void EngineDestroy(void* _engine)
159{

Callers

nothing calls this directly

Calls 5

GetMonotonicTimeFunction · 0.50
NewWindowFunction · 0.50
OpenWindowFunction · 0.50
ShowWindowFunction · 0.50

Tested by

no test coverage detected