MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / read_bytes

Function read_bytes

samples/application/chat/main.cpp:154–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void read_bytes(skr_vfs_t* vfs, const char* file_name, uint8_t** bytes, uint32_t* length)
155{
156 auto vsfile = skr_vfs_fopen(vfs, file_name, SKR_FM_READ_BINARY, SKR_FILE_CREATION_OPEN_EXISTING);
157 *length = (uint32_t)skr_vfs_fsize(vsfile);
158 *bytes = (uint8_t*)sakura_malloc(*length);
159 skr_vfs_fread(vsfile, *bytes, 0, *length);
160 skr_vfs_fclose(vsfile);
161}
162
163int InitializeImgui(Renderer& renderer, skr_vfs_t* vfs)
164{

Callers 5

InitializeImguiFunction · 0.70
create_imgui_resourcesFunction · 0.50
initialize_imguiMethod · 0.50
create_imgui_resourcesFunction · 0.50
create_imgui_resourcesFunction · 0.50

Calls 4

skr_vfs_fopenFunction · 0.85
skr_vfs_fsizeFunction · 0.85
skr_vfs_freadFunction · 0.85
skr_vfs_fcloseFunction · 0.85

Tested by

no test coverage detected