125 int rectangleCount = 0;
133 struct ModelInstance {
137 std::map<std::string, ModelInstance> models;
138 std::map<Geometry::Model*, std::string> modelsInverse;
141 struct Texture2DInstance {
145 std::map<const char*, Texture2DInstance> textures;
146 std::map<Video::Texture2D*, const char*> texturesInverse;
149 struct TextureAssetInstance {
153 std::map<std::string, TextureAssetInstance> textureAssets;
154 std::map<TextureAsset*, std::string> textureAssetsInverse;
157 struct ScriptFileInstance {
161 std::map<std::string, ScriptFileInstance> scriptFiles;
162 std::map<ScriptFile*, std::string> scriptFilesInverse;
A cube.
Definition: Cube.hpp:8
Interface of a model loaded from a file.
Definition: Model.hpp:8
Singleton class that holds all subsystems.
Definition: Managers.hpp:16
Video::Renderer * renderer
Definition: Managers.hpp:21
Handles all resources.
Definition: ResourceManager.hpp:23
void FreeModel(Geometry::Model *model)
Free the reference to the model.
Definition: ResourceManager.cpp:42
TextureAsset * CreateTextureAsset(const std::string &name)
Create a texture asset if it doesn't already exist.
Definition: ResourceManager.cpp:73
void FreeTextureAsset(TextureAsset *textureAsset)
Free the reference to the texture asset.
Definition: ResourceManager.cpp:86
ScriptFile * CreateScriptFile(const std::string &name)
Create a script file if it doesn't already exist.
Definition: ResourceManager.cpp:101
TextureAsset * GetDefaultRoughnessMetallic()
Get the default roughness-metallic texture.
Definition: ResourceManager.cpp:132
TextureAsset * GetDefaultNormal()
Get the default normal map.
Definition: ResourceManager.cpp:128
~ResourceManager()
Destructor.
Definition: ResourceManager.cpp:23
TextureAsset * GetDefaultAlbedo()
Get the default albedo texture.
Definition: ResourceManager.cpp:124
Geometry::Model * CreateModel(const std::string &name)
Create a model if it doesn't already exist.
Definition: ResourceManager.cpp:29
int GetTextureAssetInstanceCount(TextureAsset *textureAsset)
Get the number of instances of a texture asset.
Definition: ResourceManager.cpp:96
void FreeScriptFile(ScriptFile *scriptFile)
Free the reference to the script file.
Definition: ResourceManager.cpp:114
ResourceManager(Video::Renderer *renderer)
Constructor.
Definition: ResourceManager.cpp:14
Video::Texture2D * CreateTexture2D(const char *data, int dataLength)
Create a 2D texture if it doesn't already exist.
Definition: ResourceManager.cpp:52
void FreeTexture2D(Video::Texture2D *texture)
Free the reference to the 2D texture.
Definition: ResourceManager.cpp:63
Information about a file containing a script.
Definition: ScriptFile.hpp:8
A texture used in a hymn.
Definition: TextureAsset.hpp:12
A renderable 2D rectangle.
Definition: Rectangle.hpp:8
Low level renderer abstracting the underlaying graphics API (OpenGL or Vulkan).
Definition: LowLevelRenderer.hpp:27
Handles rendering using a low-level renderer.
Definition: Renderer.hpp:32
A two-dimensional texture.
Definition: Texture2D.hpp:10
Definition: AssetEditor.hpp:5
Definition: Editor.hpp:18