MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / InitGraphics

Function InitGraphics

Descent3/init.cpp:1580–1610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1578}
1579
1580void InitGraphics(bool editor) {
1581 // Init our bitmaps, must be called before InitTextures
1582 bm_InitBitmaps();
1583
1584 // Init our textures
1585 if (!InitTextures())
1586 Error("Failed to initialize texture system.");
1587
1588#ifdef EDITOR
1589 char *driver = "GDIX";
1590
1591 if (!ddgr_Init(Descent, driver, editor ? false : true))
1592 Error("DDGR graphic system init failed.");
1593
1594 // Init our renderer
1595 grSurface::init_system();
1596 rend_Init(RENDERER_OPENGL, Descent, NULL);
1597 Desktop_surf = new grSurface(0, 0, 0, SURFTYPE_VIDEOSCREEN, 0);
1598#else
1599 strcpy(App_ddvid_subsystem, "GDIX");
1600
1601 if (!Dedicated_server) {
1602 if (!ddvid_Init(Descent, App_ddvid_subsystem))
1603 Error("Graphics initialization failed.\n");
1604 }
1605
1606 INIT_MESSAGE("Loading fonts.");
1607 LoadAllFonts();
1608#endif
1609 Graphics_init = true;
1610}
1611
1612void InitGameSystems(bool editor) {
1613 // initialize possible remote controller.

Callers 1

InitD3Systems1Function · 0.85

Calls 7

bm_InitBitmapsFunction · 0.85
InitTexturesFunction · 0.85
ErrorFunction · 0.85
ddgr_InitFunction · 0.85
ddvid_InitFunction · 0.85
LoadAllFontsFunction · 0.85
rend_InitFunction · 0.50

Tested by

no test coverage detected