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

Function SelectAdapterByPriority

engine/graphics/src/graphics.cpp:100–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99
100 static bool SelectAdapterByPriority()
101 {
102 GraphicsAdapter* next = g_adapter_list;
103 GraphicsAdapter* selected = 0x0;
104
105 while(next)
106 {
107 bool is_supported = next->m_IsSupportedCb();
108 if (is_supported && ((selected != 0x0 && next->m_Priority < selected->m_Priority) || selected == 0x0))
109 {
110 selected = next;
111 }
112
113 next = next->m_Next;
114 }
115
116 if (!selected)
117 {
118 return false;
119 }
120
121 g_functions = selected->m_RegisterCb();
122 g_adapter = selected;
123 return true;
124 }
125
126 AdapterFamily GetAdapterFamily(const char* adapter_name)
127 {

Callers 1

InstallAdapterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected