Last change
on this file since 9785 was
9785,
checked in by bensch, 18 years ago
|
some implementations of the new self sustained Resources. It works, but does not yet load the correct stuff
|
File size:
822 bytes
|
Rev | Line | |
---|
[9781] | 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 | |
---|
| 14 | class ResourceTexture : public Texture, public Resource |
---|
| 15 | { |
---|
[9785] | 16 | public: |
---|
[9781] | 17 | ResourceTexture(const std::string& imageName, GLenum target = GL_TEXTURE_2D); |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | private: |
---|
[9785] | 21 | class TextureResourcePointer : public Resource::Pointer |
---|
[9781] | 22 | { |
---|
| 23 | public: |
---|
[9785] | 24 | TextureResourcePointer(const std::string& loadString, const Resource::KeepLevel& keepLevel, const TextureData::Pointer& data); |
---|
[9784] | 25 | inline const TextureData::Pointer& ptr() const { return pointer; } |
---|
[9781] | 26 | private: |
---|
[9784] | 27 | TextureData::Pointer pointer; |
---|
[9781] | 28 | }; |
---|
| 29 | |
---|
[9785] | 30 | private: |
---|
| 31 | static Resource::Type type; |
---|
[9781] | 32 | }; |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | #endif /* _RESOURCE_TEXTURE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.