增加PipelineCreateInfo保存至配置文件代码(测试中)
This commit is contained in:
parent
b87af86b4c
commit
29252ca0b1
1
3rdpty/dl_jsoncpp.sh
Normal file
1
3rdpty/dl_jsoncpp.sh
Normal file
@ -0,0 +1 @@
|
|||||||
|
git clone https://github.com/open-source-parsers/jsoncpp.git
|
1
3rdpty/dl_toml11.sh
Normal file
1
3rdpty/dl_toml11.sh
Normal file
@ -0,0 +1 @@
|
|||||||
|
git clone https://github.com/ToruNiina/toml11.git
|
@ -20,9 +20,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||||||
|
|
||||||
include_directories(${Vulkan_INCLUDE_DIRS})
|
include_directories(${Vulkan_INCLUDE_DIRS})
|
||||||
|
|
||||||
SET(SPIRV_CROSS_PATH 3rdpty/SPIRV-Cross)
|
SET(SPIRV_CROSS_PATH 3rdpty/SPIRV-Cross)
|
||||||
include_directories(${SPIRV_CROSS_PATH})
|
include_directories(${SPIRV_CROSS_PATH})
|
||||||
add_subdirectory(${SPIRV_CROSS_PATH})
|
add_subdirectory(${SPIRV_CROSS_PATH})
|
||||||
|
|
||||||
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpty/jsoncpp/include)
|
||||||
|
add_subdirectory(3rdpty/jsoncpp)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||||
add_definitions(-DVK_USE_PLATFORM_ANDROID_KHR)
|
add_definitions(-DVK_USE_PLATFORM_ANDROID_KHR)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
@ -41,6 +44,7 @@ add_definitions(-DGLFW_INCLUDE_VULKAN)
|
|||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpty/MathGeoLib/src)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpty/MathGeoLib/src)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpty/NvTriStrip)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpty/NvTriStrip)
|
||||||
|
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpty/toml11)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
||||||
|
|
||||||
SET(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
SET(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
||||||
|
@ -5,4 +5,3 @@ endmacro()
|
|||||||
|
|
||||||
CreateProject(0.triangle main)
|
CreateProject(0.triangle main)
|
||||||
CreateProject(1.cube cube)
|
CreateProject(1.cube cube)
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
using namespace hgl;
|
using namespace hgl;
|
||||||
using namespace hgl::graph;
|
using namespace hgl::graph;
|
||||||
|
|
||||||
|
void SaveToTOML(const OSString &filename,const VkGraphicsPipelineCreateInfo *info);
|
||||||
|
|
||||||
constexpr uint32_t SCREEN_WIDTH=1280;
|
constexpr uint32_t SCREEN_WIDTH=1280;
|
||||||
constexpr uint32_t SCREEN_HEIGHT=720;
|
constexpr uint32_t SCREEN_HEIGHT=720;
|
||||||
|
|
||||||
@ -101,11 +103,11 @@ private:
|
|||||||
pipeline_creater->CloseCullFace();
|
pipeline_creater->CloseCullFace();
|
||||||
pipeline_creater->Set(PRIM_TRIANGLES);
|
pipeline_creater->Set(PRIM_TRIANGLES);
|
||||||
|
|
||||||
|
SaveToTOML(OS_TEXT("pipeline.toml"),pipeline_creater->GetInfo());
|
||||||
|
|
||||||
pipeline=pipeline_creater->Create();
|
pipeline=pipeline_creater->Create();
|
||||||
|
|
||||||
delete pipeline_creater;
|
delete pipeline_creater;
|
||||||
pipeline_creater=nullptr;
|
|
||||||
|
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +109,7 @@ public:
|
|||||||
|
|
||||||
void SetBlendConstans(float *blend_constans) {hgl_typecpy(colorBlending.blendConstants,blend_constans,4);}
|
void SetBlendConstans(float *blend_constans) {hgl_typecpy(colorBlending.blendConstants,blend_constans,4);}
|
||||||
|
|
||||||
|
const VkGraphicsPipelineCreateInfo *GetInfo()const{return &pipelineInfo;}
|
||||||
Pipeline *Create();
|
Pipeline *Create();
|
||||||
};//class PipelineCreater
|
};//class PipelineCreater
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
|
@ -1,21 +1,57 @@
|
|||||||
add_library(ULRE.RenderDevice.Vulkan STATIC VKFormat.cpp
|
SET(RENDER_DEVICE_VULKAN_HEADER ${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VK.h
|
||||||
VKInstance.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKBuffer.h
|
||||||
VKPhysicalDevice.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKBufferData.h
|
||||||
VKImageView.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKCommandBuffer.h
|
||||||
VKCommandBuffer.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKDescriptorSets.h
|
||||||
VKDeviceAttribute.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKDevice.h
|
||||||
VKDeviceCreater.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKDeviceAttribute.h
|
||||||
VKDevice.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKFence.h
|
||||||
VKDeviceBuffer.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKFormat.h
|
||||||
VKBuffer.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKFramebuffer.h
|
||||||
VKDescriptorSets.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKImageView.h
|
||||||
VKRenderPass.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKInstance.h
|
||||||
VKShaderModule.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKMaterial.h
|
||||||
VKShaderModuleManage.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKPhysicalDevice.h
|
||||||
VKVertexAttributeBinding.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKPipeline.h
|
||||||
VKPipeline.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKPrimivate.h
|
||||||
VKSemaphore.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKRenderable.h
|
||||||
VKFramebuffer.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKRenderPass.h
|
||||||
VKFence.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKSemaphore.h
|
||||||
VKMaterial.cpp
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKShaderModule.h
|
||||||
VKRenderable.cpp)
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKShaderModuleManage.h
|
||||||
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKShaderParse.h
|
||||||
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKSurfaceExtensionName.h
|
||||||
|
${ROOT_INCLUDE_PATH}/hgl/graph/vulkan/VKVertexAttributeBinding.h)
|
||||||
|
|
||||||
|
SET(RENDER_DEVICE_VULKAN_SOURCE VKFormat.cpp
|
||||||
|
VKInstance.cpp
|
||||||
|
VKPhysicalDevice.cpp
|
||||||
|
VKImageView.cpp
|
||||||
|
VKCommandBuffer.cpp
|
||||||
|
VKDeviceAttribute.cpp
|
||||||
|
VKDeviceCreater.cpp
|
||||||
|
VKDevice.cpp
|
||||||
|
VKDeviceBuffer.cpp
|
||||||
|
VKBuffer.cpp
|
||||||
|
VKDescriptorSets.cpp
|
||||||
|
VKRenderPass.cpp
|
||||||
|
VKShaderModule.cpp
|
||||||
|
VKShaderModuleManage.cpp
|
||||||
|
VKVertexAttributeBinding.cpp
|
||||||
|
VKPipeline.cpp
|
||||||
|
VKSemaphore.cpp
|
||||||
|
VKFramebuffer.cpp
|
||||||
|
VKFence.cpp
|
||||||
|
VKMaterial.cpp
|
||||||
|
VKRenderable.cpp)
|
||||||
|
|
||||||
|
#SET(RENDER_DEVICE_VULKAN_TOML_SOURCE toml/VKPipelineCreateInfo.TOML.cpp)
|
||||||
|
SET(RENDER_DEVICE_VULKAN_JSON_SOURCE json/VKPipelineCreateInfo.JSON.cpp)
|
||||||
|
|
||||||
|
SOURCE_GROUP("Header Files" FILES ${RENDER_DEVICE_VULKAN_HEADER})
|
||||||
|
SOURCE_GROUP("Source Files" FILES ${RENDER_DEVICE_VULKAN_SOURCE})
|
||||||
|
SOURCE_GROUP("JSON Source Files" FILES ${RENDER_DEVICE_VULKAN_JSON_SOURCE})
|
||||||
|
|
||||||
|
add_library(ULRE.RenderDevice.Vulkan STATIC ${RENDER_DEVICE_VULKAN_HEADER}
|
||||||
|
${RENDER_DEVICE_VULKAN_SOURCE}
|
||||||
|
${RENDER_DEVICE_VULKAN_JSON_SOURCE})
|
||||||
|
131
src/RenderDevice/Vulkan/json/VKPipelineCreateInfo.JSON.cpp
Normal file
131
src/RenderDevice/Vulkan/json/VKPipelineCreateInfo.JSON.cpp
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
#include<toml.hpp>
|
||||||
|
#include<vulkan/vulkan.h>
|
||||||
|
#include<hgl/type/BaseString.h>
|
||||||
|
#include<sstream>
|
||||||
|
#include<hgl/filesystem/FileSystem.h>
|
||||||
|
|
||||||
|
using namespace hgl;
|
||||||
|
|
||||||
|
#define TOML_BEGIN(struct_name) toml::table ToTOML(const struct_name *state) \
|
||||||
|
{ \
|
||||||
|
toml::table root=toml::table
|
||||||
|
|
||||||
|
#define TOML_END ;return root; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TOML_BOOL(name) {#name,bool(state->##name)}
|
||||||
|
#define TOML_INTEGER(name) {#name,std::int64_t(state->##name)}
|
||||||
|
#define TOML_FLOAT(name) {#name,double(state->##name)}
|
||||||
|
#define TOML_STRING(name) {#name,toml::string(state->##name)}
|
||||||
|
|
||||||
|
TOML_BEGIN(VkStencilOpState)
|
||||||
|
{
|
||||||
|
TOML_INTEGER(failOp),
|
||||||
|
TOML_INTEGER(passOp),
|
||||||
|
TOML_INTEGER(depthFailOp),
|
||||||
|
TOML_INTEGER(compareOp),
|
||||||
|
TOML_INTEGER(compareMask),
|
||||||
|
TOML_INTEGER(writeMask),
|
||||||
|
TOML_INTEGER(reference)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineDepthStencilStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_BOOL (depthTestEnable),
|
||||||
|
TOML_BOOL (depthWriteEnable),
|
||||||
|
TOML_INTEGER(depthCompareOp),
|
||||||
|
TOML_BOOL (depthBoundsTestEnable),
|
||||||
|
TOML_BOOL (stencilTestEnable),
|
||||||
|
{"front", ToTOML(&state->front)},
|
||||||
|
{"back", ToTOML(&state->back)}
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineColorBlendAttachmentState)
|
||||||
|
{
|
||||||
|
TOML_BOOL(blendEnable),
|
||||||
|
TOML_INTEGER(srcColorBlendFactor),
|
||||||
|
TOML_INTEGER(dstColorBlendFactor),
|
||||||
|
TOML_INTEGER(colorBlendOp),
|
||||||
|
TOML_INTEGER(srcAlphaBlendFactor),
|
||||||
|
TOML_INTEGER(dstAlphaBlendFactor),
|
||||||
|
TOML_INTEGER(alphaBlendOp),
|
||||||
|
TOML_INTEGER(colorWriteMask)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineColorBlendStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_BOOL(logicOpEnable),
|
||||||
|
TOML_INTEGER(logicOp),
|
||||||
|
{"blendConstants", toml::array
|
||||||
|
{
|
||||||
|
state->blendConstants[0],
|
||||||
|
state->blendConstants[1],
|
||||||
|
state->blendConstants[2],
|
||||||
|
state->blendConstants[3]
|
||||||
|
}
|
||||||
|
}};
|
||||||
|
|
||||||
|
toml::array pAttachments;
|
||||||
|
|
||||||
|
for(uint i=0;i<state->attachmentCount;i++)
|
||||||
|
pAttachments.push_back(ToTOML(&(state->pAttachments[i])));
|
||||||
|
|
||||||
|
root.insert({"pAttachments",pAttachments});
|
||||||
|
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineRasterizationStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_BOOL(depthClampEnable),
|
||||||
|
TOML_BOOL(rasterizerDiscardEnable),
|
||||||
|
TOML_INTEGER(polygonMode),
|
||||||
|
TOML_INTEGER(cullMode),
|
||||||
|
TOML_INTEGER(frontFace),
|
||||||
|
TOML_BOOL(depthBiasEnable),
|
||||||
|
TOML_FLOAT(depthBiasConstantFactor),
|
||||||
|
TOML_FLOAT(depthBiasClamp),
|
||||||
|
TOML_FLOAT(depthBiasSlopeFactor),
|
||||||
|
TOML_FLOAT(lineWidth)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineMultisampleStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_INTEGER(rasterizationSamples),
|
||||||
|
TOML_BOOL(sampleShadingEnable),
|
||||||
|
TOML_FLOAT(minSampleShading),
|
||||||
|
TOML_BOOL(alphaToCoverageEnable),
|
||||||
|
TOML_BOOL(alphaToOneEnable)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineInputAssemblyStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_INTEGER(topology),
|
||||||
|
TOML_BOOL(primitiveRestartEnable)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
void SaveToTOML(const OSString &filename,const VkGraphicsPipelineCreateInfo *info)
|
||||||
|
{
|
||||||
|
const auto root=toml::table
|
||||||
|
{
|
||||||
|
{"ver",toml::table{{"file",100},{"vulkan",100}}},
|
||||||
|
{"pDepthStencilState", ToTOML(info->pDepthStencilState)},
|
||||||
|
{"pColorBlendState", ToTOML(info->pColorBlendState)},
|
||||||
|
{"pRasterizationState", ToTOML(info->pRasterizationState)},
|
||||||
|
{"pMultisampleState", ToTOML(info->pMultisampleState)},
|
||||||
|
{"pInputAssemblyState", ToTOML(info->pInputAssemblyState)}
|
||||||
|
};
|
||||||
|
|
||||||
|
std::stringstream ss;
|
||||||
|
|
||||||
|
ss<<root;
|
||||||
|
|
||||||
|
const std::string str=ss.str();
|
||||||
|
|
||||||
|
filesystem::SaveMemoryToFile(filename,str.c_str(),str.length());
|
||||||
|
}
|
131
src/RenderDevice/Vulkan/toml/VKPipelineCreateInfo.TOML.cpp
Normal file
131
src/RenderDevice/Vulkan/toml/VKPipelineCreateInfo.TOML.cpp
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
#include<toml.hpp>
|
||||||
|
#include<vulkan/vulkan.h>
|
||||||
|
#include<hgl/type/BaseString.h>
|
||||||
|
#include<sstream>
|
||||||
|
#include<hgl/filesystem/FileSystem.h>
|
||||||
|
|
||||||
|
using namespace hgl;
|
||||||
|
|
||||||
|
#define TOML_BEGIN(struct_name) toml::table ToTOML(const struct_name *state) \
|
||||||
|
{ \
|
||||||
|
toml::table root=toml::table
|
||||||
|
|
||||||
|
#define TOML_END ;return root; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TOML_BOOL(name) {#name,bool(state->##name)}
|
||||||
|
#define TOML_INTEGER(name) {#name,std::int64_t(state->##name)}
|
||||||
|
#define TOML_FLOAT(name) {#name,double(state->##name)}
|
||||||
|
#define TOML_STRING(name) {#name,toml::string(state->##name)}
|
||||||
|
|
||||||
|
TOML_BEGIN(VkStencilOpState)
|
||||||
|
{
|
||||||
|
TOML_INTEGER(failOp),
|
||||||
|
TOML_INTEGER(passOp),
|
||||||
|
TOML_INTEGER(depthFailOp),
|
||||||
|
TOML_INTEGER(compareOp),
|
||||||
|
TOML_INTEGER(compareMask),
|
||||||
|
TOML_INTEGER(writeMask),
|
||||||
|
TOML_INTEGER(reference)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineDepthStencilStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_BOOL (depthTestEnable),
|
||||||
|
TOML_BOOL (depthWriteEnable),
|
||||||
|
TOML_INTEGER(depthCompareOp),
|
||||||
|
TOML_BOOL (depthBoundsTestEnable),
|
||||||
|
TOML_BOOL (stencilTestEnable),
|
||||||
|
{"front", ToTOML(&state->front)},
|
||||||
|
{"back", ToTOML(&state->back)}
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineColorBlendAttachmentState)
|
||||||
|
{
|
||||||
|
TOML_BOOL(blendEnable),
|
||||||
|
TOML_INTEGER(srcColorBlendFactor),
|
||||||
|
TOML_INTEGER(dstColorBlendFactor),
|
||||||
|
TOML_INTEGER(colorBlendOp),
|
||||||
|
TOML_INTEGER(srcAlphaBlendFactor),
|
||||||
|
TOML_INTEGER(dstAlphaBlendFactor),
|
||||||
|
TOML_INTEGER(alphaBlendOp),
|
||||||
|
TOML_INTEGER(colorWriteMask)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineColorBlendStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_BOOL(logicOpEnable),
|
||||||
|
TOML_INTEGER(logicOp),
|
||||||
|
{"blendConstants", toml::array
|
||||||
|
{
|
||||||
|
state->blendConstants[0],
|
||||||
|
state->blendConstants[1],
|
||||||
|
state->blendConstants[2],
|
||||||
|
state->blendConstants[3]
|
||||||
|
}
|
||||||
|
}};
|
||||||
|
|
||||||
|
toml::array pAttachments;
|
||||||
|
|
||||||
|
for(uint i=0;i<state->attachmentCount;i++)
|
||||||
|
pAttachments.push_back(ToTOML(&(state->pAttachments[i])));
|
||||||
|
|
||||||
|
root.insert({"pAttachments",pAttachments});
|
||||||
|
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineRasterizationStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_BOOL(depthClampEnable),
|
||||||
|
TOML_BOOL(rasterizerDiscardEnable),
|
||||||
|
TOML_INTEGER(polygonMode),
|
||||||
|
TOML_INTEGER(cullMode),
|
||||||
|
TOML_INTEGER(frontFace),
|
||||||
|
TOML_BOOL(depthBiasEnable),
|
||||||
|
TOML_FLOAT(depthBiasConstantFactor),
|
||||||
|
TOML_FLOAT(depthBiasClamp),
|
||||||
|
TOML_FLOAT(depthBiasSlopeFactor),
|
||||||
|
TOML_FLOAT(lineWidth)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineMultisampleStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_INTEGER(rasterizationSamples),
|
||||||
|
TOML_BOOL(sampleShadingEnable),
|
||||||
|
TOML_FLOAT(minSampleShading),
|
||||||
|
TOML_BOOL(alphaToCoverageEnable),
|
||||||
|
TOML_BOOL(alphaToOneEnable)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
TOML_BEGIN(VkPipelineInputAssemblyStateCreateInfo)
|
||||||
|
{
|
||||||
|
TOML_INTEGER(topology),
|
||||||
|
TOML_BOOL(primitiveRestartEnable)
|
||||||
|
}
|
||||||
|
TOML_END
|
||||||
|
|
||||||
|
void SaveToTOML(const OSString &filename,const VkGraphicsPipelineCreateInfo *info)
|
||||||
|
{
|
||||||
|
const auto root=toml::table
|
||||||
|
{
|
||||||
|
{"ver",toml::table{{"file",100},{"vulkan",100}}},
|
||||||
|
{"pDepthStencilState", ToTOML(info->pDepthStencilState)},
|
||||||
|
{"pColorBlendState", ToTOML(info->pColorBlendState)},
|
||||||
|
{"pRasterizationState", ToTOML(info->pRasterizationState)},
|
||||||
|
{"pMultisampleState", ToTOML(info->pMultisampleState)},
|
||||||
|
{"pInputAssemblyState", ToTOML(info->pInputAssemblyState)}
|
||||||
|
};
|
||||||
|
|
||||||
|
std::stringstream ss;
|
||||||
|
|
||||||
|
ss<<root;
|
||||||
|
|
||||||
|
const std::string str=ss.str();
|
||||||
|
|
||||||
|
filesystem::SaveMemoryToFile(filename,str.c_str(),str.length());
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user