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

Function InstallAdapter

engine/graphics/src/graphics.cpp:1758–1780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1756 }
1757
1758 bool InstallAdapter(AdapterFamily family)
1759 {
1760 if (g_adapter)
1761 {
1762 return true;
1763 }
1764
1765 bool result = SelectAdapterByFamily(family);
1766
1767 if (!result)
1768 {
1769 result = SelectAdapterByPriority();
1770 }
1771
1772 if (result)
1773 {
1774 dmLogInfo("Installed graphics device '%s'", GetAdapterFamilyLiteral(g_adapter->m_Family));
1775 return true;
1776 }
1777
1778 dmLogError("Could not install a graphics adapter. No compatible adapter was found.");
1779 return false;
1780 }
1781
1782 AdapterFamily GetAdapterFamily(HGraphicsAdapter adapter)
1783 {

Callers 12

mainFunction · 0.50
SetUpMethod · 0.50
dmEngineCreateFunction · 0.50
mainFunction · 0.50
EngineCreateFunction · 0.50
SetUpMethod · 0.50
SetUpMethod · 0.50
SetUpMethod · 0.50
SetUpMethod · 0.50
SetUpMethod · 0.50
SetUpMethod · 0.50
InitFunction · 0.50

Calls 3

SelectAdapterByFamilyFunction · 0.85
SelectAdapterByPriorityFunction · 0.85
GetAdapterFamilyLiteralFunction · 0.85

Tested by 10

SetUpMethod · 0.40
mainFunction · 0.40
EngineCreateFunction · 0.40
SetUpMethod · 0.40
SetUpMethod · 0.40
SetUpMethod · 0.40
SetUpMethod · 0.40
SetUpMethod · 0.40
SetUpMethod · 0.40
InitFunction · 0.40