Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/graphics/importer/resource_texture.h @ 9823

Last change on this file since 9823 was 9823, checked in by bensch, 18 years ago

orxonox/new_class_id: now it should also be possible, to cache the resources, by suppling a LoadString.
This is vital to loading Resources, when you only know the TypeName and a LoadString, but not the c++-type and the LoadParameters as is the case when loading over the internet.

File size: 933 bytes
Line 
1/*!
2 * @file resource_texture.h
3 * @brief Contains the ResourceTexture class, that handles the Resource-specific loading part of the Texture.
4 *
5 */
6
7#ifndef _RESOURCE_TEXTURE_H
8#define _RESOURCE_TEXTURE_H
9
10#include "util/loading/resource.h"
11#include "texture.h"
12
13
14class ResourceTexture : public Texture, public Resources::NewResource
15{
16public:
17  ResourceTexture(const std::string& imageName, GLenum target = GL_TEXTURE_2D);
18  static ResourceTexture createFromString(const std::string& loadString);
19
20private:
21class TextureResourcePointer : public Resources::StorePointer
22  {
23  public:
24    TextureResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const TextureData::Pointer& data);
25    inline const TextureData::Pointer& ptr() const { return pointer; }
26private:
27    TextureData::Pointer pointer;
28  };
29
30private:
31  static Resources::tType<ResourceTexture> type;
32};
33
34
35#endif /* _RESOURCE_TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.