|
|
|
|
173
|
class TestApp1 : public DKApplication
|
173
|
class TestApp1 : public DKApplication
|
174
|
{
|
174
|
{
|
175
|
DKResourcePool resourcePool;
|
175
|
DKResourcePool resourcePool;
|
|
|
176
|
+ DKString userConfigPath;
|
|
|
177
|
+
|
176
|
public:
|
178
|
public:
|
177
|
void OnInitialize(void) override
|
179
|
void OnInitialize(void) override
|
178
|
{
|
180
|
{
|
|
|
|
|
183
|
DKLog("resPath: %ls", (const wchar_t*)resPath);
|
185
|
DKLog("resPath: %ls", (const wchar_t*)resPath);
|
184
|
resourcePool.AddLocatorForPath(resPath);
|
186
|
resourcePool.AddLocatorForPath(resPath);
|
185
|
|
187
|
|
186
|
- DKVariant vulkanProps;
|
|
|
187
|
- vulkanProps.NewValueAtKeyPath("pipelineCacheFilePath",
|
|
|
188
|
- DefaultPath(SystemPath::AppExecutable).FilePathStringByAppendingPath("pipeline.cache"));
|
|
|
189
|
-
|
|
|
190
|
- DKPropertySet::SystemConfig().SetValue("Vulkan", vulkanProps);
|
|
|
191
|
-
|
|
|
|
|
188
|
+ userConfigPath = DefaultPath(SystemPath::AppExecutable).FilePathStringByAppendingPath("app.config.xml");
|
|
|
189
|
+ int numItemsImported = DKPropertySet::DefaultSet().Import(userConfigPath, true);
|
|
|
190
|
+ if (numItemsImported >= 0)
|
|
|
191
|
+ DKLogI("UserSettings: %ls (%d items imported)", (const wchar_t*)userConfigPath, numItemsImported);
|
192
|
|
192
|
|
193
|
DKObject<DKData> vertData = resourcePool.LoadResourceData("shaders/texture/texture.vert.spv");
|
193
|
DKObject<DKData> vertData = resourcePool.LoadResourceData("shaders/texture/texture.vert.spv");
|
194
|
DKObject<DKData> fragData = resourcePool.LoadResourceData("shaders/texture/texture.frag.spv");
|
194
|
DKObject<DKData> fragData = resourcePool.LoadResourceData("shaders/texture/texture.frag.spv");
|
|
|
|
|
260
|
{
|
260
|
{
|
261
|
DKLogD("%s", DKGL_FUNCTION_NAME);
|
261
|
DKLogD("%s", DKGL_FUNCTION_NAME);
|
262
|
|
262
|
|
|
|
263
|
+ int numItemsExported = DKPropertySet::DefaultSet().Export(userConfigPath, true);
|
|
|
264
|
+ DKLogI("Setting saved: %ls (%d items exported)", (const wchar_t*)userConfigPath, numItemsExported);
|
|
|
265
|
+
|
263
|
DKLogI("Memory Pool Statistics");
|
266
|
DKLogI("Memory Pool Statistics");
|
264
|
size_t numBuckets = DKMemoryPoolNumberOfBuckets();
|
267
|
size_t numBuckets = DKMemoryPoolNumberOfBuckets();
|
265
|
DKMemoryPoolBucketStatus* buckets = new DKMemoryPoolBucketStatus[numBuckets];
|
268
|
DKMemoryPoolBucketStatus* buckets = new DKMemoryPoolBucketStatus[numBuckets];
|