Karma Engine
Loading...
Searching...
No Matches
Material.h
1#pragma once
2
3#include "krpch.h"
4
5#include "Karma/Renderer/Shader.h"
6#include "Texture.h"
7#include "Camera/Camera.h"
8
9namespace Karma
10{
11 class KARMA_API Material
12 {
13 public:
14 Material();
15
16 void OnUpdate();
17 void ProcessForSubmission();
18
19 void AttatchMainCamera(std::shared_ptr<Camera> mCamera);
20 void AddShader(std::shared_ptr<Shader> shader) { m_Shaders.push_back(shader); }
21 void RemoveShader(std::shared_ptr<Shader> shader) { m_Shaders.remove(shader); }
22 void AddTexture(std::shared_ptr<Texture> texture) { m_Textures.push_back(texture); }
23 void RemoveTexture(std::shared_ptr<Texture> texture) { m_Textures.remove(texture); }
24
25 // Getters
26 std::shared_ptr<Shader> GetShader(const std::string& shaderName) const;
27 std::shared_ptr<Shader> GetShader(int index);
28 std::shared_ptr<Texture> GetTexture(int index);
29
30 // May add Physics-relevant features in future.
31
32 private:
33 // References to shaders, textures
34 std::list<std::shared_ptr<Shader>> m_Shaders;
35 std::list<std::shared_ptr<Texture>> m_Textures;
36
37 std::shared_ptr<Camera> m_MainCamera;
38 };
39}
Definition Material.h:12