17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 19:47:30 +01:00

pch migration to modules [wip]

This commit is contained in:
maj00r
2026-09-09 20:35:26 +02:00
parent c3007e3237
commit 3f7960aad5
350 changed files with 5958 additions and 3059 deletions

View File

@@ -1,10 +1,15 @@
#pragma once
#include <glm/glm.hpp>
module;
#include <string>
#include <optional>
#include "global_include/interfaces/ITexture_macros.h"
export module eu07.global_include.interfaces.imaterial;
import eu07.glm;
import eu07.global_include.interfaces.itexture;
export {
#include "ITexture.h"
struct IMaterial
{
@@ -57,4 +62,5 @@ struct IMaterial
} null_material{};
return &null_material;
}
};
};
} // export

View File

@@ -1,8 +1,15 @@
#pragma once
module;
#include "global_include/interfaces/ITexture_macros.h"
#include <cstddef>
#include <cstdint>
#include <string_view>
export module eu07.global_include.interfaces.itexture;
export {
typedef int texture_handle;
#define null_handle (0)
struct ITexture
{
@@ -73,4 +80,5 @@ struct ITexture
} null_texture{};
return &null_texture;
}
};
};
} // export

View File

@@ -0,0 +1,8 @@
#pragma once
// Macros cannot cross a module boundary, so they live in a plain header
// that consumers pull into their global module fragment. The bodies are
// expanded at the use site, where the imported names are in scope, so this
// header deliberately includes nothing.
#define null_handle (0)