X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fmoof%2Fimage.hh;h=4dee19fde9ffe4a2e9ec65d4ee3e28c8c587df6c;hb=44b3014bce798789e795242d1556cb7449e6386a;hp=6aa251bad0a658a3ca48fd24ba61c87f124d9e9e;hpb=6c9943707d4f33035830eba0587a61a34eaecbc2;p=chaz%2Fyoink diff --git a/src/moof/image.hh b/src/moof/image.hh index 6aa251b..4dee19f 100644 --- a/src/moof/image.hh +++ b/src/moof/image.hh @@ -1,22 +1,15 @@ -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** +/*] Copyright (c) 2009-2011, Charles McGarvey [***************************** **] All rights reserved. * -* vi:ts=4 sw=4 tw=75 -* * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * -**************************************************************************/ +*****************************************************************************/ #ifndef _MOOF_IMAGE_HH_ #define _MOOF_IMAGE_HH_ -/** - * \file image.hh - * Defines classes for loading and manipulating images. - */ - #include #include @@ -24,6 +17,11 @@ #include +/** + * \file image.hh + * Defines classes for loading and manipulating images. + */ + namespace moof { @@ -33,9 +31,7 @@ public: static const int no_tile = -1; - explicit image(const std::string& path); - ~image(); int width() const @@ -63,7 +59,6 @@ public: return channels_; } - std::string comment() const { return comment_; @@ -74,10 +69,8 @@ public: return pixels_; } - void set_as_icon() const; - /** * Calculate texture coordinates for a tile at a certain index. Tiles * are indexed start with zero as the top-left tile and moving across, @@ -93,11 +86,9 @@ public: */ bool tile_coordinates(int index, scalar coords[8]) const; - void bind() const; static void reset_binding(); - private: void upload_to_gl() const; @@ -106,26 +97,25 @@ private: void set_properties() const; void set_texture_info(const std::string& info); - - char* pixels_; + char* pixels_; mutable unsigned object_; static unsigned global_object_; - int width_; - int height_; - int depth_; - int pitch_; - int channels_; + int width_; + int height_; + int depth_; + int pitch_; + int channels_; - std::string comment_; + std::string comment_; - unsigned min_filter_; - unsigned mag_filter_; - int tile_s_; - int tile_t_; - unsigned wrap_s_; - unsigned wrap_t_; + unsigned min_filter_; + unsigned mag_filter_; + int tile_s_; + int tile_t_; + unsigned wrap_s_; + unsigned wrap_t_; //mutable dispatcher::handle new_context_; };