MCPcopy Create free account
hub / github.com/crossuo/crossuo / gfx_render_list_init

Function gfx_render_list_init

src/Main.cpp:91–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89static void *s_renderCmdListData = nullptr;
90
91void gfx_render_list_init()
92{
93 if (s_renderCmdListData)
94 {
95 return;
96 }
97
98 static const uint32_t s_renderCmdListSize = 512 * 1024;
99 s_renderCmdListData = malloc(s_renderCmdListSize);
100 assert(s_renderCmdListData);
101
102 // use indirect-rendering to enable delayed render cmds (commands are pushed to the GPU when RenderDraw_Execute is called)
103 // don't use this until text resources lifetime isn't fixed (see CFontsManager::DrawA)
104 const bool immediateMode = !g_cli["indirect-rendering"].was_set();
105 static RenderCmdList s_renderCmdList(
106 s_renderCmdListData, s_renderCmdListSize, Render_DefaultState(), immediateMode);
107 g_renderCmdList = &s_renderCmdList;
108}
109
110void gfx_render_list_destroy()
111{

Callers 1

mainFunction · 0.85

Calls 2

Render_DefaultStateFunction · 0.85
was_setMethod · 0.80

Tested by

no test coverage detected