X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fpixelstore.h;fp=source%2Fpixelstore.h;h=0c430300d9be0b5bb9c89c6bdb65c2629b741fce;hp=0000000000000000000000000000000000000000;hb=055f553b1a75f44e72f3c2b5a1c98c1e1e8f3f30;hpb=a533f857e7d319c6eff2b788bbad3a238468c4b2 diff --git a/source/pixelstore.h b/source/pixelstore.h new file mode 100644 index 00000000..0c430300 --- /dev/null +++ b/source/pixelstore.h @@ -0,0 +1,35 @@ +#ifndef MSP_GL_PIXELSTORE_H_ +#define MSP_GL_PIXELSTORE_H_ + +#include +#include "bindable.h" + +namespace Msp { +namespace GL { + +class PixelStore: public BindableWithDefault +{ +private: + unsigned row_length; + unsigned image_height; + unsigned skip_pixels; + unsigned skip_rows; + unsigned skip_images; + unsigned alignment; + +public: + PixelStore(); + + static PixelStore from_image(const Graphics::Image &); + + void set_canvas_size(unsigned, unsigned); + void set_origin(unsigned, unsigned, unsigned); + void set_alignment(unsigned); + + void bind() const; +}; + +} // namespace GL +} // namespace Msp + +#endif