MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / OnDeviceCreate

Method OnDeviceCreate

ogsr_engine/Layers/xrRender/ResourceManager_Loader.cpp:27–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void CResourceManager::OnDeviceCreate()
28{
29 if (!Device.b_is_Ready)
30 return;
31
32 // scripting
33 LS_Load();
34
35 string_path fname;
36 if (FS.exist(fname, fsgame::game_data, "shaders.ltx"))
37 {
38 Msg("Loading shader file: [%s]", fname);
39 LoadShaderLtxFile(fname);
40 }
41 else
42 {
43 if (FS.exist(fname, fsgame::game_data, "shaders.xr"))
44 {
45 Msg("Loading shader file: [%s]", fname);
46 LoadShaderFile(fname);
47 }
48
49 if (FS.exist(fname, fsgame::game_data, "shaders_cop.xr"))
50 {
51 Msg("Loading shader file: [%s]", fname);
52 LoadShaderFile(fname);
53 }
54 }
55
56 m_textures_description.Load();
57}
58
59void CResourceManager::LoadShaderFile(LPCSTR fname)
60{

Callers

nothing calls this directly

Calls 3

MsgFunction · 0.85
existMethod · 0.80
LoadMethod · 0.45

Tested by

no test coverage detected