Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
skin.h
Go to the documentation of this file.
1 #ifndef SKIN_H
2 #define SKIN_H
3 #include <memory>
4 #include <glm/glm.hpp>
5 #include <vector>
7 #include "graphics/shader.h"
8 //= SCRIPTABLE
9 
10 namespace Graphics {
11  namespace UI {
15  class Skin {
16  private:
17  std::weak_ptr<BaseTexture> texture;
18  std::weak_ptr<Shader> shader;
19  public:
20  //= BEGIN SCRIPTABLE
21 
28  Skin(std::shared_ptr<BaseTexture> texture, std::shared_ptr<Shader> shader);
29 
35  void setTexture(const std::shared_ptr<BaseTexture>& texture);
41  void setShader(const std::shared_ptr<Shader>& shader);
47  std::shared_ptr<BaseTexture> getTexture();
53  std::shared_ptr<Shader> getShader();
54  //= END SCRIPTABLE
55  };
56  }
57 }
58 
59 #endif
std::shared_ptr< BaseTexture > getTexture()
Gets the texture.
Definition: skin.cpp:18
std::shared_ptr< Shader > getShader()
Gets the shader.
Definition: skin.cpp:22
void setTexture(const std::shared_ptr< BaseTexture > &texture)
Sets the texture.
Definition: skin.cpp:10
Skin(std::shared_ptr< BaseTexture > texture, std::shared_ptr< Shader > shader)
Skin constructor.
Definition: skin.cpp:6
void setShader(const std::shared_ptr< Shader > &shader)
Sets the shader.
Definition: skin.cpp:14
Class for UI skin.
Definition: skin.h:15