convert map to table
This commit is contained in:
parent
5172310fd8
commit
bce38fe13e
@ -1,9 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "any.h"
|
#include "any.h"
|
||||||
#include <map>
|
#include <unordered_map>
|
||||||
namespace refl {
|
namespace refl {
|
||||||
|
|
||||||
using ConvertFunc = bool (*)(Any&, const Any&);
|
using ConvertFunc = bool (*)(Any&, const Any&);
|
||||||
using ConvertMap = std::map<const UClass*, ConvertFunc>;
|
using ConvertMap = std::unordered_map<const UClass*, ConvertFunc>;
|
||||||
class Convert {
|
class Convert {
|
||||||
protected:
|
protected:
|
||||||
static ConvertMap BuildClassMap();
|
static ConvertMap BuildClassMap();
|
||||||
|
|||||||
@ -31,7 +31,6 @@ namespace refl {
|
|||||||
uint32_t size;
|
uint32_t size;
|
||||||
uint32_t flag{0};
|
uint32_t flag{0};
|
||||||
const UClass* parent;
|
const UClass* parent;
|
||||||
Meta* meta{nullptr};
|
|
||||||
vtable_uclass vtable{};
|
vtable_uclass vtable{};
|
||||||
public:
|
public:
|
||||||
constexpr UClass(std::string_view name, uint32_t size, const UClass* parent = nullptr)
|
constexpr UClass(std::string_view name, uint32_t size, const UClass* parent = nullptr)
|
||||||
|
|||||||
6
engine/3rdparty/zlib/include/zstd/table.h
vendored
Normal file
6
engine/3rdparty/zlib/include/zstd/table.h
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <unordered_map>
|
||||||
|
namespace zstd {
|
||||||
|
template<typename T1, typename T2, typename Hasher = std::hash<T1>>
|
||||||
|
using table = std::unordered_map<T1, T2, Hasher>;
|
||||||
|
}
|
||||||
4
engine/3rdparty/zlib/test/refl/vertex.cpp
vendored
4
engine/3rdparty/zlib/test/refl/vertex.cpp
vendored
@ -1,3 +1 @@
|
|||||||
#include "vertex.h"
|
#include "vertex.h"
|
||||||
#include "vkmeta_vertex_gen.inl"
|
|
||||||
#include "dxmeta_vertex_gen.inl"
|
|
||||||
6
engine/3rdparty/zlog/test/assetmanager.h
vendored
6
engine/3rdparty/zlog/test/assetmanager.h
vendored
@ -1,7 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "singleton.h"
|
#include "singleton.h"
|
||||||
class AssetManager :public Singleton<AssetManager> {
|
class AssetManager :public ISingleton<AssetManager> {
|
||||||
|
|
||||||
};
|
};
|
||||||
template<>
|
|
||||||
AssetManager* Singleton<AssetManager>::ms_Singleton = nullptr;
|
|
||||||
34
engine/src/3rdparty/template/singleton.h
vendored
34
engine/src/3rdparty/template/singleton.h
vendored
@ -1,9 +1,37 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
class ISystem {
|
||||||
|
public:
|
||||||
|
virtual void Init() = 0;
|
||||||
|
virtual void LateInit() {};
|
||||||
|
virtual void EarlyShutdown() {};
|
||||||
|
virtual void Shutdown() = 0;
|
||||||
|
virtual ~ISystem() = default;
|
||||||
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class Singleton {
|
class ISingleton : public ISystem{
|
||||||
protected:
|
protected:
|
||||||
static T* ms_Singleton;
|
inline static T* ms_Singleton = nullptr;
|
||||||
|
public:
|
||||||
|
explicit ISingleton() {
|
||||||
|
ms_Singleton = static_cast<T*>(this);
|
||||||
|
}
|
||||||
|
~ISingleton() {
|
||||||
|
ms_Singleton = nullptr;
|
||||||
|
}
|
||||||
|
static constexpr T& GetSingleton(void) {
|
||||||
|
return *ms_Singleton;
|
||||||
|
}
|
||||||
|
static constexpr T* GetSingletonPtr(void) {
|
||||||
|
return ms_Singleton;
|
||||||
|
}
|
||||||
|
public:
|
||||||
|
void Init() override = 0;
|
||||||
|
void Shutdown()override = 0;
|
||||||
|
};
|
||||||
|
template <typename T>
|
||||||
|
class Singleton{
|
||||||
|
protected:
|
||||||
|
inline static T* ms_Singleton = nullptr;
|
||||||
public:
|
public:
|
||||||
explicit Singleton() {
|
explicit Singleton() {
|
||||||
ms_Singleton = static_cast<T*>(this);
|
ms_Singleton = static_cast<T*>(this);
|
||||||
|
|||||||
@ -9,21 +9,33 @@ namespace engineapi {
|
|||||||
App::App(const string& path)
|
App::App(const string& path)
|
||||||
{
|
{
|
||||||
const char* name = "zengine";
|
const char* name = "zengine";
|
||||||
new AssetManager();
|
SystemList.push_back(new AssetManager());
|
||||||
_RenderAPI = RenderAPI::MakeInstance();
|
SystemList.push_back(RenderAPI::MakeInstance());
|
||||||
_Window = Window::MakeInstance(3, 640, 720, name);
|
SystemList.push_back(Window::MakeInstance(3, 640, 720, name));
|
||||||
_RenderAPI->OnInit();
|
|
||||||
auto scene_manager = new SceneManager();
|
|
||||||
scene_manager->LoadScene(path);
|
|
||||||
}
|
}
|
||||||
App::~App()
|
App::~App()
|
||||||
{
|
{
|
||||||
delete _Window;
|
for (auto system : SystemList) {
|
||||||
delete _RenderAPI;
|
delete system;
|
||||||
|
}
|
||||||
|
SystemList.clear();
|
||||||
|
}
|
||||||
|
void App::Init()
|
||||||
|
{
|
||||||
|
for (auto system : SystemList) {
|
||||||
|
system->Init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void App::Shutdown()
|
||||||
|
{
|
||||||
|
for (auto system : SystemList) {
|
||||||
|
system->Shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void App::Launch()
|
void App::Launch()
|
||||||
{
|
{
|
||||||
while (true) {
|
Init();
|
||||||
|
while (Loop) {
|
||||||
Update();
|
Update();
|
||||||
Render();
|
Render();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,19 +1,22 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include "singleton.h"
|
||||||
|
using std::vector;
|
||||||
using std::string;
|
using std::string;
|
||||||
namespace engineapi
|
namespace engineapi
|
||||||
{
|
{
|
||||||
class RenderAPI;
|
|
||||||
class Window;
|
|
||||||
class App {
|
class App {
|
||||||
public:
|
public:
|
||||||
RenderAPI* _RenderAPI{nullptr};
|
bool Loop{true};
|
||||||
Window* _Window{ nullptr };
|
vector<ISystem*> SystemList;
|
||||||
public:
|
public:
|
||||||
App(const string& path);
|
App(const string& path);
|
||||||
~App();
|
~App();
|
||||||
void Launch();
|
|
||||||
public:
|
public:
|
||||||
|
void Init();
|
||||||
|
void Shutdown();
|
||||||
|
void Launch();
|
||||||
void Update();
|
void Update();
|
||||||
void Render();
|
void Render();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,11 +3,15 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include "zstd/table.h"
|
||||||
|
#include "UTemplate/Type.hpp"
|
||||||
namespace engineapi
|
namespace engineapi
|
||||||
{
|
{
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::map;
|
using std::map;
|
||||||
|
using zstd::table;
|
||||||
|
using Ubpa::Name;
|
||||||
class Asset {
|
class Asset {
|
||||||
public:
|
public:
|
||||||
friend class AssetManager;
|
friend class AssetManager;
|
||||||
|
|||||||
@ -2,6 +2,12 @@
|
|||||||
#include "zlog.h"
|
#include "zlog.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
namespace engineapi {
|
namespace engineapi {
|
||||||
|
void AssetManager::Init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void AssetManager::Shutdown()
|
||||||
|
{
|
||||||
|
}
|
||||||
void AssetManager::ClearAsset(Asset* asset)
|
void AssetManager::ClearAsset(Asset* asset)
|
||||||
{
|
{
|
||||||
auto it = mAssetMap.find(asset->mName);
|
auto it = mAssetMap.find(asset->mName);
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
namespace engineapi
|
namespace engineapi
|
||||||
{
|
{
|
||||||
class AssetManager : public Singleton<AssetManager>
|
class AssetManager : public ISingleton<AssetManager>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct AssetWrap {
|
struct AssetWrap {
|
||||||
@ -22,6 +22,9 @@ namespace engineapi
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
map<const string, AssetWrap> mAssetMap;
|
map<const string, AssetWrap> mAssetMap;
|
||||||
|
public:
|
||||||
|
void Init() override;
|
||||||
|
void Shutdown() override;
|
||||||
public:
|
public:
|
||||||
void ClearAsset(Asset* asset);
|
void ClearAsset(Asset* asset);
|
||||||
template<typename TAsset>
|
template<typename TAsset>
|
||||||
@ -55,5 +58,3 @@ namespace engineapi
|
|||||||
static json LoadJsonFile(const string& path);
|
static json LoadJsonFile(const string& path);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
template<>
|
|
||||||
engineapi::AssetManager* Singleton<engineapi::AssetManager>::ms_Singleton = nullptr;
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#include "property.h"
|
#include "property.h"
|
||||||
|
|
||||||
namespace engineapi {
|
namespace engineapi {
|
||||||
map<uint32_t, Property> Property::PropertyMap;
|
|
||||||
}
|
}
|
||||||
@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include "zstd/table.h"
|
||||||
namespace engineapi {
|
namespace engineapi {
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::map;
|
using zstd::table;
|
||||||
class Property {
|
class Property {
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
@ -17,7 +17,7 @@ namespace engineapi {
|
|||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
string path = "";
|
string path = "";
|
||||||
public:
|
public:
|
||||||
static map<uint32_t, Property> PropertyMap;
|
inline static table<uint32_t, Property> PropertyMap;
|
||||||
|
|
||||||
template<typename TProperty>
|
template<typename TProperty>
|
||||||
static TProperty* GetProperty(uint32_t id) {
|
static TProperty* GetProperty(uint32_t id) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#include "scene_manager.h"
|
#include "scene_manager.h"
|
||||||
#include "zlog.h"
|
#include "zlog.h"
|
||||||
namespace engineapi {
|
namespace engineapi {
|
||||||
Scene* SceneManager::GetScene(const string& name)
|
Scene* SceneManager::GetScene(const Name& name)
|
||||||
{
|
{
|
||||||
auto sceneInfo = GetSceneInfo(name);
|
auto sceneInfo = GetSceneInfo(name);
|
||||||
if (sceneInfo == nullptr)
|
if (sceneInfo == nullptr)
|
||||||
@ -14,7 +14,7 @@ namespace engineapi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneManager::LoadScene(const string& path, bool switchNow)
|
void SceneManager::LoadScene(const Name& path, bool switchNow)
|
||||||
{
|
{
|
||||||
curScene = new SceneInfo{
|
curScene = new SceneInfo{
|
||||||
path,
|
path,
|
||||||
@ -22,14 +22,14 @@ namespace engineapi {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneManager::SwitchScene(const string& name)
|
void SceneManager::SwitchScene(const Name& name)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneManager::DeleteScene(const string& name)
|
void SceneManager::DeleteScene(const Name& name)
|
||||||
{
|
{
|
||||||
map<string, SceneInfo*>::iterator iter = scenes.find(name);
|
auto iter = scenes.find(name);
|
||||||
if (iter != scenes.end())
|
if (iter != scenes.end())
|
||||||
{
|
{
|
||||||
delete iter->second->scene;
|
delete iter->second->scene;
|
||||||
@ -73,9 +73,9 @@ namespace engineapi {
|
|||||||
return curScene->scene;
|
return curScene->scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneInfo* SceneManager::GetSceneInfo(const string& name)
|
SceneInfo* SceneManager::GetSceneInfo(const Name& name)
|
||||||
{
|
{
|
||||||
map<string, SceneInfo*>::iterator iter = scenes.find(name);
|
auto iter = scenes.find(name);
|
||||||
if (iter != scenes.end())
|
if (iter != scenes.end())
|
||||||
return iter->second;
|
return iter->second;
|
||||||
else
|
else
|
||||||
|
|||||||
@ -5,25 +5,23 @@
|
|||||||
namespace engineapi {
|
namespace engineapi {
|
||||||
struct SceneInfo
|
struct SceneInfo
|
||||||
{
|
{
|
||||||
string path;
|
Name name;
|
||||||
Scene* scene = nullptr;
|
Scene* scene = nullptr;
|
||||||
};
|
};
|
||||||
class SceneManager :public Singleton<SceneManager> {
|
class SceneManager :public ISingleton<SceneManager> {
|
||||||
protected:
|
protected:
|
||||||
SceneInfo* curScene = nullptr;
|
SceneInfo* curScene = nullptr;
|
||||||
map<string, SceneInfo*> scenes;
|
table<Name, SceneInfo*> scenes;
|
||||||
public:
|
public:
|
||||||
Scene* GetScene(const string& name);
|
Scene* GetScene(const Name& name);
|
||||||
void LoadScene(const string& path, bool switchNow = true);
|
void LoadScene(const Name& path, bool switchNow = true);
|
||||||
void SwitchScene(const string& name);
|
void SwitchScene(const Name& name);
|
||||||
void DeleteScene(const string& name);
|
void DeleteScene(const Name& name);
|
||||||
void DeleteAllScene();
|
void DeleteAllScene();
|
||||||
void ReloadScene();
|
void ReloadScene();
|
||||||
void Render();
|
void Render();
|
||||||
void Update();
|
void Update();
|
||||||
Scene* GetCurScene();
|
Scene* GetCurScene();
|
||||||
SceneInfo* GetSceneInfo(const string& name);
|
SceneInfo* GetSceneInfo(const Name& name);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
template<>
|
|
||||||
engineapi::SceneManager* Singleton<engineapi::SceneManager>::ms_Singleton = nullptr;
|
|
||||||
@ -9,8 +9,7 @@ namespace engineapi {
|
|||||||
struct Vertex {
|
struct Vertex {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
struct PosVertex : public Vertex {
|
||||||
struct PosVertex {
|
|
||||||
using MyMetas = class PosVertex_MultyMeta;
|
using MyMetas = class PosVertex_MultyMeta;
|
||||||
UPROPERTY_vk({}, VertexMeta{ VK_FORMAT_R32G32B32_SFLOAT })
|
UPROPERTY_vk({}, VertexMeta{ VK_FORMAT_R32G32B32_SFLOAT })
|
||||||
Vector3 Position = {};
|
Vector3 Position = {};
|
||||||
|
|||||||
@ -44,7 +44,7 @@ namespace engineapi {
|
|||||||
|
|
||||||
//RenderAPI::GetInstance()->Draw(skyBox->VAO);
|
//RenderAPI::GetInstance()->Draw(skyBox->VAO);
|
||||||
}
|
}
|
||||||
void RenderNodeForwardRendering::RenderBatches(const map<uint32_t, vector<MeshRenderer*>>& batchs)
|
void RenderNodeForwardRendering::RenderBatches(const table<uint32_t, vector<MeshRenderer*>>& batchs)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,6 @@ namespace engineapi {
|
|||||||
Model* mSky;
|
Model* mSky;
|
||||||
|
|
||||||
void RenderSkyBox(Camera& camera);
|
void RenderSkyBox(Camera& camera);
|
||||||
void RenderBatches(const map<uint32_t, vector<MeshRenderer*>>& batchs);
|
void RenderBatches(const table<uint32_t, vector<MeshRenderer*>>& batchs);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -9,7 +9,7 @@ namespace engineapi {
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
void RenderAPI::OnInit()
|
void RenderAPI::Init()
|
||||||
{
|
{
|
||||||
InitRenderNode();
|
InitRenderNode();
|
||||||
InitRenderPass();
|
InitRenderPass();
|
||||||
|
|||||||
@ -7,7 +7,7 @@ namespace engineapi
|
|||||||
class Shader;
|
class Shader;
|
||||||
class Camera;
|
class Camera;
|
||||||
class RenderNode;
|
class RenderNode;
|
||||||
class RenderAPI : public Singleton<RenderAPI>
|
class RenderAPI : public ISingleton<RenderAPI>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
uint32_t mFrame;
|
uint32_t mFrame;
|
||||||
@ -19,11 +19,13 @@ namespace engineapi
|
|||||||
RenderAPI();
|
RenderAPI();
|
||||||
virtual ~RenderAPI() {};
|
virtual ~RenderAPI() {};
|
||||||
public:
|
public:
|
||||||
virtual RenderContext* GetContext() = 0;
|
void Init() override;
|
||||||
public:
|
void Shutdown() override {};
|
||||||
virtual void OnInit();
|
|
||||||
virtual void InitRenderNode();
|
virtual void InitRenderNode();
|
||||||
virtual void InitRenderPass() = 0;
|
virtual void InitRenderPass() = 0;
|
||||||
|
public:
|
||||||
|
virtual RenderContext* GetContext() = 0;
|
||||||
public:
|
public:
|
||||||
virtual void SetViewPort(uint32_t width, uint32_t height, uint32_t xOffset = 0, uint32_t yOffset = 0) = 0;
|
virtual void SetViewPort(uint32_t width, uint32_t height, uint32_t xOffset = 0, uint32_t yOffset = 0) = 0;
|
||||||
virtual void BeginFrame() = 0;
|
virtual void BeginFrame() = 0;
|
||||||
@ -39,6 +41,4 @@ namespace engineapi
|
|||||||
public:
|
public:
|
||||||
static RenderAPI* MakeInstance();
|
static RenderAPI* MakeInstance();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
template<>
|
|
||||||
engineapi::RenderAPI* Singleton<engineapi::RenderAPI>::ms_Singleton = nullptr;
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include "singleton.h"
|
#include "singleton.h"
|
||||||
namespace engineapi {
|
namespace engineapi {
|
||||||
class Window : public Singleton<Window> {
|
class Window : public ISingleton<Window> {
|
||||||
protected:
|
protected:
|
||||||
int mWidth;
|
int mWidth;
|
||||||
int mHeight;
|
int mHeight;
|
||||||
@ -29,6 +29,9 @@ namespace engineapi {
|
|||||||
static LRESULT CALLBACK HandleMsgSetup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
|
static LRESULT CALLBACK HandleMsgSetup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
|
||||||
static LRESULT CALLBACK HandleMsgThunk(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
|
static LRESULT CALLBACK HandleMsgThunk(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
|
||||||
LRESULT HandleMsg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
|
LRESULT HandleMsg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
|
||||||
|
public:
|
||||||
|
void Init() override {};
|
||||||
|
void Shutdown() override {};
|
||||||
public:
|
public:
|
||||||
Window(int width, int height, const char* title);
|
Window(int width, int height, const char* title);
|
||||||
HWND Ptr() {
|
HWND Ptr() {
|
||||||
@ -42,6 +45,4 @@ namespace engineapi {
|
|||||||
static bool ProcessMessages(int& code);
|
static bool ProcessMessages(int& code);
|
||||||
static Window* MakeInstance(int frames, uint32_t width, uint32_t height, const char* title);
|
static Window* MakeInstance(int frames, uint32_t width, uint32_t height, const char* title);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
template<>
|
|
||||||
engineapi::Window* Singleton<engineapi::Window>::ms_Singleton = nullptr;
|
|
||||||
@ -11,7 +11,7 @@ namespace vulkanapi {
|
|||||||
Instance* mInstance;
|
Instance* mInstance;
|
||||||
Device* mDevice;
|
Device* mDevice;
|
||||||
DescriptorPool* mPool;
|
DescriptorPool* mPool;
|
||||||
map<const string*, CommandWorker*> mWorkerMap;
|
table<const string*, CommandWorker*> mWorkerMap;
|
||||||
public:
|
public:
|
||||||
Instance& GetInstance() {
|
Instance& GetInstance() {
|
||||||
return *mInstance;
|
return *mInstance;
|
||||||
|
|||||||
0
engine/src/engine/vulkanapi/tool/glsl_loader.cpp
Normal file
0
engine/src/engine/vulkanapi/tool/glsl_loader.cpp
Normal file
0
engine/src/engine/vulkanapi/tool/glsl_loader.h
Normal file
0
engine/src/engine/vulkanapi/tool/glsl_loader.h
Normal file
@ -5,7 +5,7 @@
|
|||||||
#include "volk.h"
|
#include "volk.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include "zstd/table.h"
|
||||||
namespace vulkanapi {
|
namespace vulkanapi {
|
||||||
#define Z_USE_GRAPHIC_DEBUG
|
#define Z_USE_GRAPHIC_DEBUG
|
||||||
class CommandBuffer;
|
class CommandBuffer;
|
||||||
@ -13,7 +13,7 @@ using std::array;
|
|||||||
using std::string;
|
using std::string;
|
||||||
using std::to_string;
|
using std::to_string;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::map;
|
using zstd::table;
|
||||||
using std::make_pair;
|
using std::make_pair;
|
||||||
using voidFn = std::function<void()>;
|
using voidFn = std::function<void()>;
|
||||||
using commandFn = std::function<void(CommandBuffer& cmd)>;
|
using commandFn = std::function<void(CommandBuffer& cmd)>;
|
||||||
|
|||||||
@ -8,7 +8,7 @@ using engineapi::Matrix4;
|
|||||||
using engineapi::FrameBufferType;
|
using engineapi::FrameBufferType;
|
||||||
using engineapi::ClearInfo;
|
using engineapi::ClearInfo;
|
||||||
using engineapi::CommandType;
|
using engineapi::CommandType;
|
||||||
#define ShaderModuleSet map<VkShaderStageFlagBits, VkShaderModule>
|
#define ShaderModuleSet table<VkShaderStageFlagBits, VkShaderModule>
|
||||||
|
|
||||||
namespace vulkanapi
|
namespace vulkanapi
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,7 +9,7 @@ namespace vulkanapi {
|
|||||||
protected:
|
protected:
|
||||||
VkDevice mPtr{ NULL };
|
VkDevice mPtr{ NULL };
|
||||||
VkPhysicalDevice mPhysical{NULL};
|
VkPhysicalDevice mPhysical{NULL};
|
||||||
map<const string*, Queue*> mQueueMap;
|
table<const string*, Queue*> mQueueMap;
|
||||||
public:
|
public:
|
||||||
VkDevice& Ptr() {
|
VkDevice& Ptr() {
|
||||||
return mPtr;
|
return mPtr;
|
||||||
|
|||||||
@ -15,7 +15,7 @@ function cmd_compile(genfile, sourcefile, template, macro, define)
|
|||||||
table.insert(argv, define)
|
table.insert(argv, define)
|
||||||
end
|
end
|
||||||
print("cmd_meta_compile", genfile)
|
print("cmd_meta_compile", genfile)
|
||||||
os.runv(meta.program, argv)
|
os.execv(meta.program, argv)
|
||||||
return argv
|
return argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user