mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
add post-effect-slot resource & add gfx.posteffects library
This commit is contained in:
parent
c3bc084e76
commit
64039f0e43
11 changed files with 182 additions and 12 deletions
|
|
@ -189,6 +189,8 @@ constexpr const char* to_string(ResourceType type) {
|
|||
switch (type) {
|
||||
case ResourceType::CAMERA:
|
||||
return "camera";
|
||||
case ResourceType::POST_EFFECT_SLOT:
|
||||
return "post-effect-slot";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
|
|
@ -197,6 +199,8 @@ constexpr const char* to_string(ResourceType type) {
|
|||
inline std::optional<ResourceType> ResourceType_from(std::string_view str) {
|
||||
if (str == "camera") {
|
||||
return ResourceType::CAMERA;
|
||||
} else if (str == "post-effect-slot") {
|
||||
return ResourceType::POST_EFFECT_SLOT;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ class ContentPackRuntime;
|
|||
|
||||
enum class ContentType { NONE, BLOCK, ITEM, ENTITY, GENERATOR };
|
||||
|
||||
enum class ResourceType : size_t { CAMERA, LAST = CAMERA };
|
||||
enum class ResourceType : size_t {
|
||||
CAMERA,
|
||||
POST_EFFECT_SLOT,
|
||||
LAST = POST_EFFECT_SLOT
|
||||
};
|
||||
|
||||
inline constexpr auto RESOURCE_TYPES_COUNT =
|
||||
static_cast<size_t>(ResourceType::LAST) + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue