#ifndef GOSUIMPL_GRAPHICS_TEXTURE_HPP #define GOSUIMPL_GRAPHICS_TEXTURE_HPP #include #include #include #include #include #include #include #include namespace Gosu { class Texture { BlockAllocator allocator; GLuint name; unsigned num; public: Texture(unsigned size); ~Texture(); unsigned size() const; GLuint texName() const; std::auto_ptr tryAlloc(Graphics& graphics, Transforms& transforms, DrawOpQueueStack& queues, boost::shared_ptr ptr, const Bitmap& bmp, unsigned padding); void free(unsigned x, unsigned y); Gosu::Bitmap toBitmap(unsigned x, unsigned y, unsigned width, unsigned height) const; }; } #endif