123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- //===========================================================================//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- #pragma once
- #define MLR_GOSIMAGEPOOL_HPP
- #if !defined(MLR_MLR_HPP)
- #include <MLR\MLR.hpp>
- #endif
- namespace MidLevelRenderer {
- class GOSImagePool
- #if defined(_ARMOR)
- : public Stuff::Signature
- #endif
- {
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Constructors/Destructors
- //
- public:
- GOSImagePool();
- ~GOSImagePool();
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Image handling
- //
- public:
- GOSImage*
- GetImage(const char* imageName);
- GOSImage*
- GetImage(const char* imageName, gos_TextureFormat format, int size, gos_TextureHints hints);
- virtual bool
- LoadImage(GOSImage *image, int=0)=0;
- void
- RemoveImage(GOSImage *image);
-
- void UnLoadImages (void);
- void
- GetTexturePath(Stuff::MString* pName) const
- { Check_Object(this); *pName = texturePath; }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Testing
- //
- public:
- void
- TestInstance() const
- {}
- protected:
- Stuff::HashOf<GOSImage*, Stuff::MString>
- imageHash;
- Stuff::MString
- texturePath;
- };
- class TGAFilePool:
- public GOSImagePool
- {
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Constructors/Destructors
- //
- public:
- TGAFilePool(const char* path);
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Image handling
- //
- public:
- bool
- LoadImage(GOSImage *image, int=0);
- };
- }
|