完成将配置类独立
parent
014b6e1c4d
commit
8461390496
|
@ -0,0 +1,46 @@
|
||||||
|
#include "renderConfig.h"
|
||||||
|
|
||||||
|
void PlumageConfig::PlumageConfiguration::writrConfigurationToJson()
|
||||||
|
{
|
||||||
|
nlohmann::json configJson = nlohmann::json
|
||||||
|
{
|
||||||
|
{"width",settings.width},
|
||||||
|
{"height",settings.height},
|
||||||
|
{"validation",settings.validation},
|
||||||
|
{"fullscreen",settings.fullscreen},
|
||||||
|
{"vsync",settings.vsync},
|
||||||
|
{"multiSampling",settings.multiSampling},
|
||||||
|
{"rotateModel",settings.rotateModel},
|
||||||
|
//{"headless",settings.headless},
|
||||||
|
//{"outputPNGimage",settings.outputPNGimage},
|
||||||
|
//{"enableSaveToImageSequeue",settings.enableSaveToImageSequeue},
|
||||||
|
{"outputFrameCount",settings.endFrameIndex},
|
||||||
|
//{"takeScreenShot",settings.takeScreenShot},
|
||||||
|
{"startFrameCount",settings.endFrameIndex},
|
||||||
|
{"videoFrameRate",settings.videoFrameRate},
|
||||||
|
{"sampleCount",settings.sampleCount},
|
||||||
|
//{"",settings.},
|
||||||
|
//{"",settings.}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
std::ofstream configJsonFile(filePath.configFilePath);
|
||||||
|
std::setw(4);
|
||||||
|
//configJson >> configJsonFile;
|
||||||
|
configJsonFile << configJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlumageConfig::PlumageConfiguration::readConfigurationToJson(std::string configFilePath)
|
||||||
|
{
|
||||||
|
nlohmann::json configJsonFile;
|
||||||
|
std::ifstream jfile("test.json");
|
||||||
|
jfile >> configJsonFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlumageConfig::PlumageConfiguration::PlumageConfiguration()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
PlumageConfig::PlumageConfiguration::~PlumageConfiguration()
|
||||||
|
{
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
|
@ -14,8 +15,7 @@ namespace PlumageConfig
|
||||||
class PlumageConfiguration
|
class PlumageConfiguration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlumageConfiguration();
|
|
||||||
~PlumageConfiguration();
|
|
||||||
|
|
||||||
struct Settings {
|
struct Settings {
|
||||||
uint32_t width = 1280;
|
uint32_t width = 1280;
|
||||||
|
@ -24,18 +24,25 @@ namespace PlumageConfig
|
||||||
bool fullscreen = false; // 全屏开关
|
bool fullscreen = false; // 全屏开关
|
||||||
bool vsync = false; // 垂直同步开关
|
bool vsync = false; // 垂直同步开关
|
||||||
bool multiSampling = false; // 多重采样
|
bool multiSampling = false; // 多重采样
|
||||||
bool rotateModel = true; // 模型自旋转(暂时失效)
|
VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_4_BIT; // 多重采样倍率
|
||||||
|
bool rotateModel = true; // 模型自旋转
|
||||||
|
uint32_t modelRotateSpeed = 2;
|
||||||
bool headless = false; // 无头开关
|
bool headless = false; // 无头开关
|
||||||
bool outputPNGimage = false;
|
bool outputPNGimage = false;
|
||||||
bool enableSaveToImageSequeue = true; // 图片序列开关(暂时弃用)
|
//bool enableSaveToImageSequeue = true; // 图片序列开关(暂时弃用)
|
||||||
uint32_t outputFrameCount = 50; // 图片序列结束帧
|
uint32_t startFrameIndex = 1; // 图片序列开始帧
|
||||||
bool takeScreenShot = false; // 截屏(暂时弃用)
|
uint32_t endFrameIndex = 50; // 图片序列结束帧
|
||||||
uint32_t startFrameCount = 1; // 图片序列开始帧
|
uint32_t videoFrameRate = 25; // 视频帧率
|
||||||
|
uint32_t selectedPhysicalDeviceIndex = 0;
|
||||||
|
float fovX;
|
||||||
|
float fovY;
|
||||||
|
float cX;
|
||||||
|
float cY;
|
||||||
|
glm::vec3 bottomCenter;
|
||||||
|
glm::vec3 bottomNormal;
|
||||||
|
|
||||||
uint32_t videoFrameRate = 25;
|
}settings;
|
||||||
|
|
||||||
VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_4_BIT; // 多重采样倍率
|
|
||||||
} settings;
|
|
||||||
|
|
||||||
struct FilePath
|
struct FilePath
|
||||||
{ //model path
|
{ //model path
|
||||||
|
@ -88,7 +95,7 @@ namespace PlumageConfig
|
||||||
// script file path
|
// script file path
|
||||||
std::string image2videoBatFilePath = getAssetPath() + "script/image2video.bat";
|
std::string image2videoBatFilePath = getAssetPath() + "script/image2video.bat";
|
||||||
std::string image2videoShFilePath = getAssetPath() + "script/image2video.sh";
|
std::string image2videoShFilePath = getAssetPath() + "script/image2video.sh";
|
||||||
|
// 配置文件路径,命令行传入后保存在这
|
||||||
std::string configFilePath = getAssetPath() + "config/config.json";
|
std::string configFilePath = getAssetPath() + "config/config.json";
|
||||||
|
|
||||||
} filePath;
|
} filePath;
|
||||||
|
@ -97,17 +104,15 @@ namespace PlumageConfig
|
||||||
|
|
||||||
void readConfigurationToJson(std::string configFilePath);
|
void readConfigurationToJson(std::string configFilePath);
|
||||||
|
|
||||||
|
PlumageConfiguration();
|
||||||
|
~PlumageConfiguration();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PlumageConfiguration::PlumageConfiguration()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
PlumageConfiguration::~PlumageConfiguration()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ VkResult VulkanExampleBase::createInstance(bool enableValidation)
|
||||||
|
|
||||||
if (!settings.headless)
|
if (!settings.headless)
|
||||||
{
|
{
|
||||||
instanceExtensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME);
|
//instanceExtensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME);
|
||||||
// Enable surface extensions depending on os
|
// Enable surface extensions depending on os
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
instanceExtensions.push_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
|
instanceExtensions.push_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
|
||||||
|
@ -78,6 +78,7 @@ VkResult VulkanExampleBase::createInstance(bool enableValidation)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VkInstanceCreateInfo instanceCreateInfo = {};
|
VkInstanceCreateInfo instanceCreateInfo = {};
|
||||||
instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||||
instanceCreateInfo.pNext = NULL;
|
instanceCreateInfo.pNext = NULL;
|
||||||
|
@ -87,11 +88,11 @@ VkResult VulkanExampleBase::createInstance(bool enableValidation)
|
||||||
instanceCreateInfo.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
|
instanceCreateInfo.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (settings.validation) {
|
||||||
|
instanceExtensions.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
|
||||||
|
}
|
||||||
if (instanceExtensions.size() > 0)
|
if (instanceExtensions.size() > 0)
|
||||||
{
|
{
|
||||||
if (settings.validation) {
|
|
||||||
instanceExtensions.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
|
|
||||||
}
|
|
||||||
instanceCreateInfo.enabledExtensionCount = (uint32_t)instanceExtensions.size();
|
instanceCreateInfo.enabledExtensionCount = (uint32_t)instanceExtensions.size();
|
||||||
instanceCreateInfo.ppEnabledExtensionNames = instanceExtensions.data();
|
instanceCreateInfo.ppEnabledExtensionNames = instanceExtensions.data();
|
||||||
}
|
}
|
||||||
|
@ -356,11 +357,11 @@ VulkanExampleBase::VulkanExampleBase()
|
||||||
}
|
}
|
||||||
if ((args[i] == std::string("-w")) || (args[i] == std::string("--width"))) {
|
if ((args[i] == std::string("-w")) || (args[i] == std::string("--width"))) {
|
||||||
uint32_t w = strtol(args[i + 1], &numConvPtr, 10);
|
uint32_t w = strtol(args[i + 1], &numConvPtr, 10);
|
||||||
if (numConvPtr != args[i + 1]) { width = w; };
|
if (numConvPtr != args[i + 1]) { settings.width = w; };
|
||||||
}
|
}
|
||||||
if ((args[i] == std::string("-h")) || (args[i] == std::string("--height"))) {
|
if ((args[i] == std::string("-h")) || (args[i] == std::string("--height"))) {
|
||||||
uint32_t h = strtol(args[i + 1], &numConvPtr, 10);
|
uint32_t h = strtol(args[i + 1], &numConvPtr, 10);
|
||||||
if (numConvPtr != args[i + 1]) { height = h; };
|
if (numConvPtr != args[i + 1]) { settings.height = h; };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -568,8 +569,8 @@ void VulkanExampleBase::setupFrameBuffer()
|
||||||
imageCI.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
|
imageCI.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
|
||||||
imageCI.imageType = VK_IMAGE_TYPE_2D;
|
imageCI.imageType = VK_IMAGE_TYPE_2D;
|
||||||
imageCI.format = colorFormat;
|
imageCI.format = colorFormat;
|
||||||
imageCI.extent.width = width;
|
imageCI.extent.width = settings.width;
|
||||||
imageCI.extent.height = height;
|
imageCI.extent.height = settings.height;
|
||||||
imageCI.extent.depth = 1;
|
imageCI.extent.depth = 1;
|
||||||
imageCI.mipLevels = 1;
|
imageCI.mipLevels = 1;
|
||||||
imageCI.arrayLayers = 1;
|
imageCI.arrayLayers = 1;
|
||||||
|
@ -611,8 +612,8 @@ void VulkanExampleBase::setupFrameBuffer()
|
||||||
// Depth target
|
// Depth target
|
||||||
imageCI.imageType = VK_IMAGE_TYPE_2D;
|
imageCI.imageType = VK_IMAGE_TYPE_2D;
|
||||||
imageCI.format = depthFormat;
|
imageCI.format = depthFormat;
|
||||||
imageCI.extent.width = width;
|
imageCI.extent.width = settings.width;
|
||||||
imageCI.extent.height = height;
|
imageCI.extent.height = settings.height;
|
||||||
imageCI.extent.depth = 1;
|
imageCI.extent.depth = 1;
|
||||||
imageCI.mipLevels = 1;
|
imageCI.mipLevels = 1;
|
||||||
imageCI.arrayLayers = 1;
|
imageCI.arrayLayers = 1;
|
||||||
|
@ -652,8 +653,8 @@ void VulkanExampleBase::setupFrameBuffer()
|
||||||
VkImageCreateInfo image = vks::initializers::imageCreateInfo();
|
VkImageCreateInfo image = vks::initializers::imageCreateInfo();
|
||||||
image.imageType = VK_IMAGE_TYPE_2D;
|
image.imageType = VK_IMAGE_TYPE_2D;
|
||||||
image.format = colorFormat;
|
image.format = colorFormat;
|
||||||
image.extent.width = width;
|
image.extent.width = settings.width;
|
||||||
image.extent.height = height;
|
image.extent.height = settings.height;
|
||||||
image.extent.depth = 1;
|
image.extent.depth = 1;
|
||||||
image.mipLevels = 1;
|
image.mipLevels = 1;
|
||||||
image.arrayLayers = 1;
|
image.arrayLayers = 1;
|
||||||
|
@ -692,7 +693,7 @@ void VulkanExampleBase::setupFrameBuffer()
|
||||||
depthImageCI.pNext = NULL;
|
depthImageCI.pNext = NULL;
|
||||||
depthImageCI.imageType = VK_IMAGE_TYPE_2D;
|
depthImageCI.imageType = VK_IMAGE_TYPE_2D;
|
||||||
depthImageCI.format = depthFormat;
|
depthImageCI.format = depthFormat;
|
||||||
depthImageCI.extent = { width, height, 1 };
|
depthImageCI.extent = { settings.width, settings.height, 1 };
|
||||||
depthImageCI.mipLevels = 1;
|
depthImageCI.mipLevels = 1;
|
||||||
depthImageCI.arrayLayers = 1;
|
depthImageCI.arrayLayers = 1;
|
||||||
depthImageCI.samples = VK_SAMPLE_COUNT_1_BIT;
|
depthImageCI.samples = VK_SAMPLE_COUNT_1_BIT;
|
||||||
|
@ -751,12 +752,12 @@ void VulkanExampleBase::setupFrameBuffer()
|
||||||
frameBufferCI.renderPass = renderPass;
|
frameBufferCI.renderPass = renderPass;
|
||||||
frameBufferCI.attachmentCount = settings.multiSampling ? 4 :2;
|
frameBufferCI.attachmentCount = settings.multiSampling ? 4 :2;
|
||||||
frameBufferCI.pAttachments = attachments;
|
frameBufferCI.pAttachments = attachments;
|
||||||
frameBufferCI.width = width;
|
frameBufferCI.width = settings.width;
|
||||||
frameBufferCI.height = height;
|
frameBufferCI.height = settings.height;
|
||||||
frameBufferCI.layers = 1;
|
frameBufferCI.layers = 1;
|
||||||
|
|
||||||
// Create frame buffers for every swap chain image
|
// Create frame buffers for every swap chain image
|
||||||
frameBuffers.resize(settings.outputFrameCount - settings.startFrameCount + 1);
|
frameBuffers.resize(settings.endFrameIndex - settings.startFrameIndex + 1);
|
||||||
for (uint32_t i = 0; i < frameBuffers.size(); i++) {
|
for (uint32_t i = 0; i < frameBuffers.size(); i++) {
|
||||||
if (settings.multiSampling) {
|
if (settings.multiSampling) {
|
||||||
attachments[1] = colorAttachment.view;
|
attachments[1] = colorAttachment.view;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
|
#include "renderConfig.h"
|
||||||
#include "vulkan/vulkan.h"
|
#include "vulkan/vulkan.h"
|
||||||
|
|
||||||
#include "VulkanTools.h"
|
#include "VulkanTools.h"
|
||||||
|
@ -80,6 +81,10 @@ protected:
|
||||||
//void windowResize();
|
//void windowResize();
|
||||||
public:
|
public:
|
||||||
static std::vector<const char*> args;
|
static std::vector<const char*> args;
|
||||||
|
// temporary
|
||||||
|
PlumageConfig::PlumageConfiguration setter;
|
||||||
|
PlumageConfig::PlumageConfiguration::Settings settings = setter.settings;
|
||||||
|
PlumageConfig::PlumageConfiguration::FilePath filePath = setter.filePath;
|
||||||
uint32_t selectedPhysicalDeviceIndex = 0;
|
uint32_t selectedPhysicalDeviceIndex = 0;
|
||||||
bool prepared = false;
|
bool prepared = false;
|
||||||
|
|
||||||
|
@ -100,26 +105,8 @@ public:
|
||||||
|
|
||||||
}signal;
|
}signal;
|
||||||
|
|
||||||
struct Settings {
|
|
||||||
uint32_t width = 1280;
|
|
||||||
uint32_t height = 720;
|
|
||||||
bool validation = true; // 校验层开关
|
|
||||||
bool fullscreen = false; // 全屏开关
|
|
||||||
bool vsync = false; // 垂直同步开关
|
|
||||||
bool multiSampling = false; // 多重采样
|
|
||||||
bool rotateModel = true; // 模型自旋转(暂时失效)
|
|
||||||
bool headless = false; // 无头开关
|
|
||||||
bool outputPNGimage = false;
|
|
||||||
bool enableSaveToImageSequeue = true; // 图片序列开关(暂时弃用)
|
|
||||||
uint32_t outputFrameCount = 50; // 图片序列结束帧
|
|
||||||
bool takeScreenShot = false; // 截屏(暂时弃用)
|
|
||||||
uint32_t startFrameCount = 1; // 图片序列开始帧
|
|
||||||
|
|
||||||
uint32_t videoFrameRate = 25;
|
|
||||||
|
|
||||||
VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_4_BIT; // 多重采样倍率
|
|
||||||
} settings;
|
|
||||||
|
|
||||||
|
/*
|
||||||
struct FilePath
|
struct FilePath
|
||||||
{ //model path
|
{ //model path
|
||||||
std::string glTFModelFilePath = getAssetPath() + "models/DamagedHelmet/DamagedHelmet.gltf";
|
std::string glTFModelFilePath = getAssetPath() + "models/DamagedHelmet/DamagedHelmet.gltf";
|
||||||
|
@ -173,7 +160,7 @@ public:
|
||||||
std::string image2videoShFilePath = getAssetPath() + "script/image2video.sh";
|
std::string image2videoShFilePath = getAssetPath() + "script/image2video.sh";
|
||||||
|
|
||||||
} filePath;
|
} filePath;
|
||||||
|
*/
|
||||||
struct DepthStencil {
|
struct DepthStencil {
|
||||||
VkImage image;
|
VkImage image;
|
||||||
VkDeviceMemory mem;
|
VkDeviceMemory mem;
|
||||||
|
|
|
@ -33,8 +33,11 @@ function(buildHomework HOMEWORK_NAME)
|
||||||
add_executable(${HOMEWORK_NAME} ${MAIN_CPP} ${SOURCE} ${MAIN_HEADER} ${SHADERS_GLSL} ${SHADERS_HLSL} ${README_FILES}
|
add_executable(${HOMEWORK_NAME} ${MAIN_CPP} ${SOURCE} ${MAIN_HEADER} ${SHADERS_GLSL} ${SHADERS_HLSL} ${README_FILES}
|
||||||
"render/glTFModel.h"
|
"render/glTFModel.h"
|
||||||
"render/glTFModel.cpp"
|
"render/glTFModel.cpp"
|
||||||
|
#"render/render.h"
|
||||||
|
#"render/render.cpp"
|
||||||
|
|
||||||
"render/renderFoundation.h" "render/renderFoundation.cpp" "render/renderConfig.cpp" "render/renderConfig.h")
|
|
||||||
|
)
|
||||||
target_link_libraries(${HOMEWORK_NAME} base ${Vulkan_LIBRARY})
|
target_link_libraries(${HOMEWORK_NAME} base ${Vulkan_LIBRARY})
|
||||||
else(WIN32)
|
else(WIN32)
|
||||||
add_executable(${HOMEWORK_NAME} ${MAIN_CPP} ${SOURCE} ${MAIN_HEADER} ${SHADERS_GLSL} ${SHADERS_HLSL} ${README_FILES})
|
add_executable(${HOMEWORK_NAME} ${MAIN_CPP} ${SOURCE} ${MAIN_HEADER} ${SHADERS_GLSL} ${SHADERS_HLSL} ${README_FILES})
|
||||||
|
|
|
@ -1548,7 +1548,7 @@ PlumageRender::PlumageRender()
|
||||||
camera.rotationSpeed = 0.25f;
|
camera.rotationSpeed = 0.25f;
|
||||||
camera.movementSpeed = 0.1f;
|
camera.movementSpeed = 0.1f;
|
||||||
|
|
||||||
auto frameRange = settings.outputFrameCount - settings.startFrameCount + 1;
|
auto frameRange = settings.endFrameIndex - settings.startFrameIndex + 1;
|
||||||
|
|
||||||
waitFences.resize(renderAhead);
|
waitFences.resize(renderAhead);
|
||||||
presentCompleteSemaphores.resize(renderAhead);
|
presentCompleteSemaphores.resize(renderAhead);
|
||||||
|
@ -1841,7 +1841,7 @@ PlumageRender::PlumageRender()
|
||||||
void PlumageRender::outputImageSequence()
|
void PlumageRender::outputImageSequence()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (savedFrameCounter == settings.startFrameCount)
|
if (savedFrameCounter == settings.startFrameIndex)
|
||||||
{
|
{
|
||||||
std::cout << "clean up directory for image sequence generation" << std::endl;
|
std::cout << "clean up directory for image sequence generation" << std::endl;
|
||||||
removeImageSequence();
|
removeImageSequence();
|
||||||
|
@ -1849,7 +1849,7 @@ PlumageRender::PlumageRender()
|
||||||
|
|
||||||
filePath.deviceSpecFilePath = filePath.imageOutputPath + "/device" + std::to_string(selectedPhysicalDeviceIndex);
|
filePath.deviceSpecFilePath = filePath.imageOutputPath + "/device" + std::to_string(selectedPhysicalDeviceIndex);
|
||||||
|
|
||||||
if (savedFrameCounter > settings.outputFrameCount)
|
if (savedFrameCounter > settings.endFrameIndex)
|
||||||
{
|
{
|
||||||
if (signal.imageSequenceOutputComplete) // 避免重复改变为true
|
if (signal.imageSequenceOutputComplete) // 避免重复改变为true
|
||||||
{
|
{
|
||||||
|
@ -1929,7 +1929,7 @@ PlumageRender::PlumageRender()
|
||||||
|
|
||||||
void PlumageRender::removeImageSequence()
|
void PlumageRender::removeImageSequence()
|
||||||
{
|
{
|
||||||
if (savedFrameCounter != settings.startFrameCount)
|
if (savedFrameCounter != settings.endFrameIndex)
|
||||||
{
|
{
|
||||||
if (!signal.imageSequenceToVideoComplete)
|
if (!signal.imageSequenceToVideoComplete)
|
||||||
{
|
{
|
||||||
|
|
|
@ -238,7 +238,7 @@ public:
|
||||||
|
|
||||||
UI* gui;
|
UI* gui;
|
||||||
|
|
||||||
uint64_t savedFrameCounter = settings.startFrameCount;
|
uint64_t savedFrameCounter = settings.startFrameIndex;
|
||||||
|
|
||||||
|
|
||||||
PlumageRender();
|
PlumageRender();
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
#include "renderConfig.h"
|
|
||||||
|
|
||||||
void PlumageConfig::PlumageConfiguration::writrConfigurationToJson()
|
|
||||||
{
|
|
||||||
nlohmann::json configJsonFile = nlohmann::json
|
|
||||||
{
|
|
||||||
{"width",settings.width},
|
|
||||||
{"height",settings.height},
|
|
||||||
{"validation",settings.validation},
|
|
||||||
{"fullscreen",settings.fullscreen},
|
|
||||||
{"vsync",settings.vsync},
|
|
||||||
{"multiSampling",settings.multiSampling},
|
|
||||||
{"rotateModel",settings.rotateModel},
|
|
||||||
{"headless",settings.headless},
|
|
||||||
{"outputPNGimage",settings.outputPNGimage},
|
|
||||||
{"enableSaveToImageSequeue",settings.enableSaveToImageSequeue},
|
|
||||||
{"outputFrameCount",settings.outputFrameCount},
|
|
||||||
{"takeScreenShot",settings.takeScreenShot},
|
|
||||||
{"startFrameCount",settings.startFrameCount},
|
|
||||||
{"videoFrameRate",settings.videoFrameRate},
|
|
||||||
{"sampleCount",settings.sampleCount},
|
|
||||||
{"",settings.},
|
|
||||||
{"",settings.}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlumageConfig::PlumageConfiguration::readConfigurationToJson(std::string configFilePath)
|
|
||||||
{
|
|
||||||
nlohmann::json configJsonFile;
|
|
||||||
std::ifstream jfile("test.json");
|
|
||||||
jfile >> configJsonFile;
|
|
||||||
}
|
|
Loading…
Reference in New Issue