X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=input.h;fp=input.h;h=d41b2662b957ac7602e93907e0d0c8c02db3ba16;hp=b3eb836a26a8f9d4e1754ddc3574e866763dce2a;hb=4e2afd327f1ef1bb03f1371a9527bc843fe636bd;hpb=ad0e48a8b82a679f1d2836254ef33320e7162733 diff --git a/input.h b/input.h index b3eb836..d41b266 100644 --- a/input.h +++ b/input.h @@ -1,6 +1,8 @@ #ifndef _INPUT_H #define _INPUT_H 1 +#include + #include "effect.h" #include "image_format.h" @@ -43,13 +45,22 @@ public: return pixel_data; } + void set_pitch(unsigned pitch) { + assert(!finalized); + this->pitch = pitch; + } + + unsigned get_pitch() { + return pitch; + } + private: ImageFormat image_format; GLenum format; GLuint pbo, texture_num; - bool needs_update; + bool needs_update, finalized; int use_srgb_texture_format, needs_mipmaps; - unsigned width, height, bytes_per_pixel; + unsigned width, height, pitch, bytes_per_pixel; const unsigned char *pixel_data; };