Cogs.Core
MaterialReader.h
1#pragma once
2
3#include "Resources/MaterialDefinition.h"
4
5#include "JsonParser.h"
6
7#include "Foundation/StringView.h"
8
9#include <span>
10
11namespace Cogs::Core
12{
13 [[nodiscard]] bool readMaterialProperties(Context * context, const Value & jsonValue, MaterialProperties & materialProperties, bool isShared);
14
15 [[nodiscard]] bool readMaterialVariants(Context * context, const Value & value, std::vector<ShaderVariantDefinition> & variants, bool isShared=false);
16
17 [[nodiscard]] bool parseMaterial(class Context * context, const StringView & path, MaterialDefinition & definition);
18
19 [[nodiscard]] bool inheritMaterialVariants(std::vector<ShaderVariantDefinition>& definitionVariants,
20 std::span<const ShaderVariantDefinition> sourceVariants,
21 const Cogs::StringView& definitionName,
22 const Cogs::StringView& sourceName,
23 bool errorOnExisting = true);
24}
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....