#include <boost/shared_ptr.hpp>
-#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();
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) :
};
private:
+ class texture_impl;
boost::shared_ptr<texture_impl> impl;
};
#endif // _TEXTURE_HH_
+/** vim: set ts=4 sw=4 tw=80: *************************************************/
+