aboutsummaryrefslogtreecommitdiffstats
path: root/src/texture.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/texture.hpp')
-rw-r--r--src/texture.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/texture.hpp b/src/texture.hpp
index 8cfd68c..3daebbd 100644
--- a/src/texture.hpp
+++ b/src/texture.hpp
@@ -22,6 +22,8 @@
#include <soil/SOIL.h>
+#include <sol/sol.hpp>
+
#include <GL/glew.h>
#include <SDL2/SDL_opengl.h>
#include <glm/glm.hpp>
@@ -31,16 +33,19 @@
class Texture
{
private:
+ void loadFromString(std::string);
public:
GLuint tex = 0;
- int width;
- int height;
glm::vec2 offset = glm::vec2(0);
- glm::vec2 offsetSize = glm::vec2(1);
+ glm::vec2 size = glm::vec2(1);
+
+ int width;
+ int height;
Texture() {};
Texture(std::string);
+ Texture(sol::object);
};
#endif//TEXTURE_HPP_