HatchitResource
ht_rendertarget_resource.h
1 
15 #pragma once
16 
17 #include <ht_resource.h>
18 
19 namespace Hatchit {
20 
21  namespace Resource {
22 
23  class HT_API RenderTarget : public FileResource<RenderTarget>
24  {
25  public:
26  enum class BlendOp
27  {
28  ADD,
29  SUB,
30  REV_SUB,
31  MIN,
32  MAX,
33  NONE
34  };
35 
36  RenderTarget(Core::Guid ID);
37  virtual ~RenderTarget() = default;
38 
39  //Required function for all RefCounted classes
40  bool Initialize(const std::string& fileName);
41 
42  uint32_t GetWidth() const;
43  uint32_t GetHeight() const;
44  std::string GetFormat() const;
45  std::vector<float> GetClearColor() const;
46  BlendOp GetColorBlendOp() const;
47  BlendOp GetAlphaBlendOp() const;
48 
49  private:
50  uint32_t m_width;
51  uint32_t m_height;
52  std::string m_format;
53  std::vector<float> m_clearColor;
54  BlendOp m_colorBlendOp;
55  BlendOp m_alphaBlendOp;
56 
57  BlendOp getBlendOpFromString(const std::string& blendOpString);
58  };
59 
60  using RenderTargetHandle = Core::Handle<const RenderTarget>;
61  }
62 }
Definition: ht_resource.h:35
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_assimp.h:31
Definition: ht_rendertarget_resource.h:23