You.i Engine
YiTextureFactory.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_TEXTURE_FACTORY_H_
3 #define _YI_TEXTURE_FACTORY_H_
4 
5 #include "utility/YiRtti.h"
6 #include "utility/YiString.h"
7 
8 #include <memory>
9 
10 class CYIAssetTexture;
12 class CYIAssetTextureNPatch;
14 
21 {
22 public:
26  static std::shared_ptr<CYIAssetTexture> CreateAsset();
27 
31  static std::shared_ptr<CYIAssetTextureBase> CreateAsset(const CYIString &filename, CYIImageAssetLoadParams *pDecodeParams = nullptr);
32 
36  static std::shared_ptr<CYIAssetTextureBase> CreateAssetFromPath(const CYIString &path, CYIImageAssetLoadParams *pDecodeParams = nullptr);
37 
41  static std::shared_ptr<CYIAssetTextureBase> CreateAsset(const uint8_t *pData, uint32_t uSize, CYIImageAssetLoadParams *pDecodeParams = nullptr);
42 
48  static std::shared_ptr<CYIAssetTextureBase> CreateAssetFromPath(const CYIRuntimeTypeInfo &info, const CYIString &path, CYIImageAssetLoadParams *pDecodeParams = nullptr);
49 
55  static std::shared_ptr<CYIAssetTextureBase> CreateAsset(const CYIRuntimeTypeInfo &info, const uint8_t *pData, uint32_t uSize, CYIImageAssetLoadParams *pDecodeParams = nullptr);
56 
62  static std::shared_ptr<CYIAssetTextureBase> CreateAsset(const CYIRuntimeTypeInfo &info, const CYIString &filename, CYIImageAssetLoadParams *pDecodeParams = nullptr);
63 
64 private:
66  CYITextureFactory(const CYITextureFactory & factory);
67 };
68 
73 #endif // _YI_TEXTURE_FACTORY_H_
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
A texture asset representing an image which will be loaded into the GPU.
Definition: YiAssetTexture.h:23
Asset loading parameters which are specific to image asset decoding.
Definition: YiImageAssetLoadParams.h:22
The abstract runtime representation of a C++ type.
Definition: YiRtti.h:48
static std::shared_ptr< CYIAssetTextureBase > CreateAssetFromPath(const CYIString &path, CYIImageAssetLoadParams *pDecodeParams=nullptr)
Definition: YiTextureFactory.h:20
This asset represents the base class for POT (Power Of Two) and NPOT (Non-Power Of Two) textures...
Definition: YiAssetTextureBase.h:24
This file contains the classes and macros used to implement RTTI in You.i Engine. ...
static std::shared_ptr< CYIAssetTexture > CreateAsset()