X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fimage.hh;fp=src%2Fmoof%2Fimage.hh;h=89a7faa1518dfeeb8245ae31ba8e9446e662a396;hp=4dee19fde9ffe4a2e9ec65d4ee3e28c8c587df6c;hb=62f3ceaff75a6b08cb1aec9a465773bb81a2d79d;hpb=44b3014bce798789e795242d1556cb7449e6386a diff --git a/src/moof/image.hh b/src/moof/image.hh index 4dee19f..89a7faa 100644 --- a/src/moof/image.hh +++ b/src/moof/image.hh @@ -59,11 +59,6 @@ public: return channels_; } - std::string comment() const - { - return comment_; - } - const char* pixels() const { return pixels_; @@ -76,26 +71,28 @@ public: * are indexed start with zero as the top-left tile and moving across, * then down. * \param index The tile index. - * \param coords An array of scalars where the texture coordinates will - * be stored after this call. The first coordinate (u,v) will be in - * the first two places and so on until all four coordinates are + * \param coords An array of scalars where the texture coordinates + * will be stored after this call. The first coordinate (u,v) will be + * in the first two places and so on until all four coordinates are * stored, therefore requiring enough room for an array of eight - * scalars. The winding of the coordinates is always counter-clockwise - * (the GL default). + * scalars. The winding of the coordinates is always + * counter-clockwise (the GL default). * \return True if index is valid, false otherwise. */ bool tile_coordinates(int index, scalar coords[8]) const; + void fix_uv(std::vector& p) const; + void bind() const; static void reset_binding(); private: + void postprocess(); void upload_to_gl() const; void unload_from_gl() const; void context_recreated(); void set_properties() const; - void set_texture_info(const std::string& info); char* pixels_; @@ -108,8 +105,6 @@ private: int pitch_; int channels_; - std::string comment_; - unsigned min_filter_; unsigned mag_filter_; int tile_s_;