X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Ftexture.hh;h=f92ad23faf06db7c16c59c2d22d107ec6ad920e7;hp=1be4c5a004287fe51fc7e0832870e638055d13fe;hb=7d15b919681bb9ec0088b4b27c6abf62d6dfb9b1;hpb=6dfcfbd4a612230f2037cf891dd98520cb80c997 diff --git a/src/texture.hh b/src/texture.hh index 1be4c5a..f92ad23 100644 --- a/src/texture.hh +++ b/src/texture.hh @@ -38,19 +38,17 @@ #include -#include "resource.hh" #include "opengl.hh" +#include "resource.hh" namespace dc { -class texture_impl; - class texture : public resource { public: - texture(const std::string& name, bool keepInMemory = false); + texture(const std::string& name); void bind(); GLuint getObject(); @@ -58,6 +56,15 @@ public: unsigned getWidth(); unsigned getHeight(); + void setMinFilter(GLuint filter); + void setMaxFilter(GLuint filter); + void setWrapU(GLuint wrap); + void setWrapV(GLuint wrap); + + void applyChanges(); + + static std::string getPathToResource(const std::string& name); + struct exception : std::runtime_error { explicit exception(const std::string& what_arg) : @@ -65,6 +72,7 @@ public: }; private: + class texture_impl; boost::shared_ptr impl; }; @@ -73,3 +81,5 @@ private: #endif // _TEXTURE_HH_ +/** vim: set ts=4 sw=4 tw=80: *************************************************/ +