MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/FleX / allocText

Function allocText

demo/imgui.cpp:34–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32static char g_textPool[TEXT_POOL_SIZE];
33static unsigned g_textPoolSize = 0;
34static const char* allocText(const char* text)
35{
36 int len = (int)(strlen(text)+1);
37 if (g_textPoolSize + len >= TEXT_POOL_SIZE)
38 return 0;
39 char* dst = &g_textPool[g_textPoolSize];
40 memcpy(dst, text, len);
41 g_textPoolSize += len;
42 return dst;
43}
44
45static const unsigned GFXCMD_QUEUE_SIZE = 5000;
46static imguiGfxCmd g_gfxCmdQueue[GFXCMD_QUEUE_SIZE];

Callers 1

addGfxCmdTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected