]> code.bitgloo.com Git - clyne/gamedev2.git/commitdiff
Added texture size and offset data
authorAndy Belle-Isle <drumsetmonkey@gmail.com>
Sat, 14 Sep 2019 05:10:41 +0000 (01:10 -0400)
committerAndy Belle-Isle <drumsetmonkey@gmail.com>
Sat, 14 Sep 2019 05:10:41 +0000 (01:10 -0400)
src/texture.hpp

index 25fed54f07fddef0fc61a4ebe257517fb7d3da90..8cfd68c640c06666808d49c53132f06d4a661f0c 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <GL/glew.h>
 #include <SDL2/SDL_opengl.h>
+#include <glm/glm.hpp>
 
 #include <string>
 
@@ -34,6 +35,10 @@ public:
     GLuint tex = 0;
     int width;
     int height;
+
+    glm::vec2 offset = glm::vec2(0);
+    glm::vec2 offsetSize = glm::vec2(1);
+
     Texture() {};
     Texture(std::string);
 };