mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-12-27 12:31:50 +00:00
feat: dump techsets for t6
This commit is contained in:
0
src/ObjCommon/Techset/CommonTechnique.cpp
Normal file
0
src/ObjCommon/Techset/CommonTechnique.cpp
Normal file
32
src/ObjCommon/Techset/CommonTechnique.h
Normal file
32
src/ObjCommon/Techset/CommonTechnique.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace techset
|
||||
{
|
||||
class CommonTechniqueShader
|
||||
{
|
||||
public:
|
||||
std::string m_name;
|
||||
uint32_t m_version_major;
|
||||
uint32_t m_version_minor;
|
||||
};
|
||||
|
||||
class CommonPass
|
||||
{
|
||||
public:
|
||||
uint64_t m_flags;
|
||||
uint32_t m_sampler_flags;
|
||||
CommonTechniqueShader m_vertex_shader;
|
||||
CommonTechniqueShader m_pixel_shader;
|
||||
};
|
||||
|
||||
class CommonTechnique
|
||||
{
|
||||
public:
|
||||
uint64_t m_flags;
|
||||
std::vector<CommonPass> m_passes;
|
||||
};
|
||||
} // namespace techset
|
||||
22
src/ObjCommon/Techset/CommonTechset.cpp
Normal file
22
src/ObjCommon/Techset/CommonTechset.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "CommonTechset.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
techset::CommonTechniqueTypeNames::CommonTechniqueTypeNames(const char** names, const size_t nameCount)
|
||||
: m_names(nameCount)
|
||||
{
|
||||
std::copy(names, &names[nameCount], m_names.data());
|
||||
}
|
||||
|
||||
const char* techset::CommonTechniqueTypeNames::GetTechniqueTypeName(const size_t techniqueTypeIndex) const
|
||||
{
|
||||
if (techniqueTypeIndex >= m_names.size())
|
||||
return nullptr;
|
||||
|
||||
return m_names[techniqueTypeIndex];
|
||||
}
|
||||
|
||||
size_t techset::CommonTechniqueTypeNames::GetTechniqueTypeCount() const
|
||||
{
|
||||
return m_names.size();
|
||||
}
|
||||
27
src/ObjCommon/Techset/CommonTechset.h
Normal file
27
src/ObjCommon/Techset/CommonTechset.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace techset
|
||||
{
|
||||
class CommonTechniqueTypeNames
|
||||
{
|
||||
public:
|
||||
CommonTechniqueTypeNames(const char** names, size_t nameCount);
|
||||
|
||||
[[nodiscard]] const char* GetTechniqueTypeName(size_t techniqueTypeIndex) const;
|
||||
[[nodiscard]] size_t GetTechniqueTypeCount() const;
|
||||
|
||||
private:
|
||||
std::vector<const char*> m_names;
|
||||
};
|
||||
|
||||
class CommonTechset
|
||||
{
|
||||
public:
|
||||
std::string m_name;
|
||||
std::vector<std::string> m_technique_names;
|
||||
};
|
||||
} // namespace techset
|
||||
Reference in New Issue
Block a user