Ocular Engine
AxisGizmoRenderable.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_GIZMO_AXIS_RENDERABLE__H__
19 #define __H__OCULAR_EDITOR_GIZMO_AXIS_RENDERABLE__H__
20 
21 #include "Scene/ARenderable.hpp"
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
31  namespace Graphics
32  {
33  class Material;
34  class Mesh;
35  }
36 
41  namespace Editor
42  {
50  {
51  public:
52 
54  virtual ~AxisGizmoRenderable();
55 
56  virtual bool initialize() override;
57 
58  virtual bool preRender() override;
59  virtual void render() override;
60  virtual void render(Graphics::Material* material) override;
61 
62  virtual uint32_t getRenderPriority() const override;
63 
64  void setSelected(bool selected);
65 
66  protected:
67 
68  bool initializeMaterials();
69  bool initializeMaterialNormal();
70  bool initializeMaterialSelected();
71 
72  bool initializeMesh();
73 
74  //------------------------------------------------------------
75 
78 
79  Graphics::Mesh* m_Mesh;
80 
81  Graphics::DepthStencilState m_DSSPreRender;
82  Graphics::DepthStencilState m_DSSPostRender;
83 
84  bool m_IsSelected;
85 
86  private:
87  };
88  }
92 }
97 //------------------------------------------------------------------------------------------
98 
99 #endif
virtual uint32_t getRenderPriority() const override
Definition: AxisGizmoRenderable.cpp:131
virtual void render() override
Definition: AxisGizmoRenderable.cpp:105
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Combination of a VertexBuffer and IndexBuffer.
Definition: Mesh.hpp:49
Definition: DepthStencilState.hpp:113
Definition: AxisGizmoRenderable.hpp:49
Definition: ARenderable.hpp:53
Graphics::Material * m_MaterialSelected
Material when rendering the component when it is selected.
Definition: AxisGizmoRenderable.hpp:77
virtual bool preRender() override
Definition: AxisGizmoRenderable.cpp:85
Graphics::Material * m_MaterialNormal
Material when rendering the component when not selected. Will use axis color.
Definition: AxisGizmoRenderable.hpp:76
Definition: Material.hpp:62