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

Function dmEngineCreate

engine/engine/src/engine.cpp:2591–2611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2589
2590
2591dmEngine::HEngine dmEngineCreate(int argc, char *argv[])
2592{
2593 const char* arg_adapter_name = ParseArgOneOperand("--graphics-adapter", argc, argv);
2594
2595 if (!dmGraphics::InstallAdapter(dmGraphics::GetAdapterFamily(arg_adapter_name)))
2596 {
2597 return 0;
2598 }
2599
2600 dmEngine::HEngine engine = dmEngine::New(dmEngine::g_EngineService);
2601 bool initialized = dmEngine::Init(engine, argc, argv);
2602
2603 if (!initialized)
2604 {
2605 // Leave cleaning up of engine service to the finalize call
2606 Delete(engine);
2607 return 0;
2608 }
2609
2610 return engine;
2611}
2612
2613void dmEngineDestroy(dmEngine::HEngine engine)
2614{

Callers 1

TestEngineCreateFunction · 0.85

Calls 6

ParseArgOneOperandFunction · 0.85
GetAdapterFamilyFunction · 0.85
NewFunction · 0.70
DeleteFunction · 0.70
InstallAdapterFunction · 0.50
InitFunction · 0.50

Tested by 1

TestEngineCreateFunction · 0.68