You.i Engine
YiGPUObject.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_GPU_OBJECT_H_
3 #define _YI_GPU_OBJECT_H_
4 
5 #include "framework/YiPredef.h"
6 #include "signal/YiSignal.h"
9 
19 {
20 public:
22  {
27  };
28 
29  inline IYIGPUObject();
30 
31  inline virtual ~IYIGPUObject();
32 
40  virtual void Load(const std::shared_ptr<CYIAssetHardware> &pHWAsset) = 0;
41 
45  virtual void Unload() = 0;
46 
50  inline YI_GPU_OBJECT_STATUS GetStatus() const;
51 
55  virtual void Use() const = 0;
56 
60  virtual void Generate() = 0;
61 
65  virtual void Free() = 0;
66 
78  virtual void InvalidateHandle() = 0;
79 
80 protected:
82 };
83 
88 {
89 }
90 
92 {
93 }
94 
96 {
97  return m_status;
98 }
99 
100 #endif // _YI_GPU_OBJECT_H_
virtual void InvalidateHandle()=0
virtual void Load(const std::shared_ptr< CYIAssetHardware > &pHWAsset)=0
The data from the associated asset is successfully loaded.
Definition: YiGPUObject.h:25
virtual void Generate()=0
YI_GPU_OBJECT_STATUS m_status
Definition: YiGPUObject.h:81
YI_GPU_OBJECT_STATUS GetStatus() const
Definition: YiGPUObject.h:95
Handle is valid, but no data has been loaded.
Definition: YiGPUObject.h:24
An interface for managing GPU-bound objects such as shaders and textures.
Definition: YiGPUObject.h:18
Handle is not valid, Generate() has not been successfully executed.
Definition: YiGPUObject.h:23
virtual void Use() const =0
IYIGPUObject()
Definition: YiGPUObject.h:87
virtual void Free()=0
YI_GPU_OBJECT_STATUS
Definition: YiGPUObject.h:21
The data that is loaded does not match the information in the last Load() call, but data is loaded in...
Definition: YiGPUObject.h:26
virtual ~IYIGPUObject()
Definition: YiGPUObject.h:91
virtual void Unload()=0