]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture.cpp
Add support for integer vertex attributes
[libs/gl.git] / source / core / texture.cpp
index 5197b3da4bd7461564305e8d9f7ffa7e8312a794..347634d4c27fa204d169c6a731f39139165f3213 100644 (file)
@@ -3,7 +3,6 @@
 #include <msp/gl/extensions/ext_framebuffer_object.h>
 #include <msp/gl/extensions/khr_debug.h>
 #include <msp/io/memory.h>
-#include "bindable.h"
 #include "error.h"
 #include "resourcemanager.h"
 #include "resources.h"
@@ -35,6 +34,13 @@ Texture::Texture(GLenum t, ResourceManager *m):
                set_manager(m);
        else
                generate_id();
+
+       static bool alignment_init = false;
+       if(!alignment_init)
+       {
+               glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+               alignment_init = true;
+       }
 }
 
 Texture::~Texture()