Added debug check in SHGraphicsSystem to compile assets only in debug

This commit is contained in:
Brandon Mak 2022-11-21 00:38:45 +08:00
parent 5d3603ac7d
commit 485b60c6d8
1 changed files with 3 additions and 0 deletions

View File

@ -119,6 +119,7 @@ namespace SHADE
SHFreetypeInstance::Init(); SHFreetypeInstance::Init();
#ifdef _DEBUG
SHAssetManager::CompileAsset("../../Assets/Shaders/Text_VS.glsl", false); SHAssetManager::CompileAsset("../../Assets/Shaders/Text_VS.glsl", false);
SHAssetManager::CompileAsset("../../Assets/Shaders/Text_FS.glsl", false); SHAssetManager::CompileAsset("../../Assets/Shaders/Text_FS.glsl", false);
SHAssetManager::CompileAsset("../../Assets/Shaders/TestCube_VS.glsl", false); SHAssetManager::CompileAsset("../../Assets/Shaders/TestCube_VS.glsl", false);
@ -126,6 +127,8 @@ namespace SHADE
SHAssetManager::CompileAsset("../../Assets/Shaders/UI_FS.glsl", false); SHAssetManager::CompileAsset("../../Assets/Shaders/UI_FS.glsl", false);
SHAssetManager::CompileAsset("../../Assets/Models/Quad.gltf", false); SHAssetManager::CompileAsset("../../Assets/Models/Quad.gltf", false);
#endif
// Load Built In Shaders // Load Built In Shaders
static constexpr AssetID VS_DEFAULT = 39210065; defaultVertShader = SHResourceManager::LoadOrGet<SHVkShaderModule>(VS_DEFAULT); static constexpr AssetID VS_DEFAULT = 39210065; defaultVertShader = SHResourceManager::LoadOrGet<SHVkShaderModule>(VS_DEFAULT);