#include <string.h>
#include <assert.h>
+#include <GL/glew.h>
#include "flat_input.h"
#include "util.h"
-#include "opengl.h"
FlatInput::FlatInput(ImageFormat image_format, MovitPixelFormat pixel_format, GLenum type, unsigned width, unsigned height)
: image_format(image_format),
check_error();
glBindTexture(GL_TEXTURE_2D, texture_num);
check_error();
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ check_error();
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, needs_mipmaps ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR);
check_error();
glPixelStorei(GL_UNPACK_ROW_LENGTH, pitch);