save code

This commit is contained in:
xsl
2025-10-26 00:13:08 +08:00
parent 41a659bd6d
commit b2da84f903
66 changed files with 24834 additions and 78 deletions
+35 -3
View File
@@ -7,7 +7,30 @@
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/matrix_transform.inl>
#include "nlohmann/json.hpp"
using namespace std;
using json = nlohmann::json;
struct Motion {
string type;
string technique;
string step;
string show_type;
string png_name;
int png_num;
string getMotionId() {
return type + technique + step + show_type;
}
NLOHMANN_DEFINE_TYPE_INTRUSIVE(Motion, type, technique, step, show_type, png_name, png_num)
};
struct InitArg
{
int action_fps;
float zoom;
Motion motion;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(InitArg, action_fps, zoom)
};
struct PushConstants {
@@ -79,7 +102,10 @@ private:
VkPipeline m_graphicsPipeline = VK_NULL_HANDLE;
VkPipelineLayout m_pipelineLayout = VK_NULL_HANDLE;
VkDescriptorSetLayout m_descriptorSetLayout = VK_NULL_HANDLE;
VkDescriptorSet m_descriptor_set = VK_NULL_HANDLE;
vector<VkDescriptorSet> m_descriptor_sets;
const int kMaxTexture = 20;
vector<Texture> m_texs;
vector<Texture> m_texs_ex;
std::vector<TextureLoadingVertexStructure> obj_vertices;
@@ -95,8 +121,7 @@ private:
void* uniform_buffer_mapped = nullptr; // 映射的内存指针
void createUniformBuffer();
Texture tex_demo0 = {0};
Texture tex_demo0_ex = { 0 };
bool faceAppInited = false;
float myFloatValue = 1.5f;
@@ -110,6 +135,13 @@ private:
VkPipelineLayout m_pipelineLayout_bg = VK_NULL_HANDLE;
VkDescriptorSetLayout m_descriptorSetLayout_bg = VK_NULL_HANDLE;
VkDescriptorSet m_descriptor_set_bg = VK_NULL_HANDLE;
void changeMotion(Motion& motion);
public:
InitArg _initArg;
Motion _curMotion;
int _curTexIndex = 0;
void SetInitArg(const char* arg);
};
#endif