You.i Engine
YiGNMFramebufferObject.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_GNM_FRAMEBUFFER_OBJECT_H_
3 #define _YI_GNM_FRAMEBUFFER_OBJECT_H_
4 
7 #include <gnm.h>
8 
14 class CYIAsset;
15 
16 
18 {
19 public:
20  CYIGNMFramebufferObject(bool screenBuffer = false);
21  virtual ~CYIGNMFramebufferObject();
22 
23  //Inherited from IYIGPUObject
24  virtual void Load(const std::shared_ptr<CYIAssetHardware> &pAsset) override;
25  virtual void Unload() override;
26  virtual void Use() const override;
27 
28 
29  bool HasDepth() const;
30  bool HasColor() const;
31 
38  void Sync() const;
39  void Clear(float r, float g, float b, float a);
40  void ClearDepth();
41 
42 protected:
43  //Inherited from IYIGPUObject
44  virtual void Generate() override;
45  virtual void Free() override;
46  virtual void InvalidateHandle() override;
47 
48 private:
49  bool m_bHasColor;
50  bool m_bHasDepthStencil;
51  bool m_bScreenBuffer;
52 
53  sce::Gnm::RenderTarget m_RenderTarget;
54  sce::Gnm::DepthRenderTarget m_DepthRenderTarget;
55 };
56 
59 #endif // _YI_GNM_FRAMEBUFFER_OBJECT_H_
virtual void Generate() override
void Clear(float r, float g, float b, float a)
CYIGNMFramebufferObject(bool screenBuffer=false)
An abstract class for common Gnm buffer functionality.
Definition: YiGNMAbstractBufferObject.h:17
virtual void Free() override
virtual ~CYIGNMFramebufferObject()
bool HasDepth() const
virtual void Use() const override
virtual void Load(const std::shared_ptr< CYIAssetHardware > &pAsset) override
Base class for any asset. An asset provides functions for dynamically loading and unloading itself an...
Definition: YiAsset.h:33
bool HasColor() const
virtual void Unload() override
virtual void InvalidateHandle() override
Definition: YiGNMFramebufferObject.h:17