[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Usata-commits] Changes to usata2/src/texture.hpp
From: |
David Lau |
Subject: |
[Usata-commits] Changes to usata2/src/texture.hpp |
Date: |
Mon, 17 Jan 2005 19:12:09 -0500 |
Index: usata2/src/texture.hpp
diff -u usata2/src/texture.hpp:1.5 usata2/src/texture.hpp:1.6
--- usata2/src/texture.hpp:1.5 Sat Jan 15 19:17:35 2005
+++ usata2/src/texture.hpp Tue Jan 18 00:12:08 2005
@@ -10,7 +10,7 @@
// included in the software distribution, or visit
// http://www.fsf.org/licenses/gpl.html.
//
-// $Id: texture.hpp,v 1.5 2005/01/15 19:17:35 skunix Exp $
+// $Id: texture.hpp,v 1.6 2005/01/18 00:12:08 skunix Exp $
#ifndef USATA_TEXTURE_HPP
#define USATA_TEXTURE_HPP
@@ -20,7 +20,8 @@
#include <memory>
#include <boost/filesystem/path.hpp>
#include <boost/shared_ptr.hpp>
-
+#include "texture-meta.hpp"
+#include "resource-manager.hpp"
namespace usata
{
@@ -37,6 +38,7 @@
void allocate_gltex (void);
public:
Texture(const TextureMeta*);
+ Texture(const TextureMeta&);
bool reload(const TextureMeta*);
GLuint get_tex() { return tex_id; }
~Texture();
@@ -44,6 +46,15 @@
typedef boost::shared_ptr<Texture> Texture_sp;
+ class ImageManager : public ResourceManager<Texture, TextureMeta,
std::string>
+ {
+ typedef resource Image_sp;
+ public:
+ Image_sp get(const std::string& name);
+ void meta_add(const TextureMeta*);
+ void load_path(const boost::filesystem::path&);
+ };
+
class TextureManager
{
std::auto_ptr<TextureManagerImpl> impl;