X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=input.h;h=d41b2662b957ac7602e93907e0d0c8c02db3ba16;hp=dd80bb61ca6f82b3822300239d993aed6368231a;hb=4faa7b922355c43f89efd62418dfa03ebf06b9c2;hpb=d3cf1194740dbecde06f5e721a7e1910437a7666 diff --git a/input.h b/input.h index dd80bb6..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 texture_num; - bool needs_update; + GLuint pbo, texture_num; + 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; };